The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A199922 Table read by rows, T(0,0) = 1 and for n>0, 0<=k<=3^(n-1) T(n,k) = gcd(k,3^(n-1)). 2
1, 1, 1, 3, 1, 1, 3, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 27, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 27, 81, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 27, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 27, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 81 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
From G. C. Greubel, Nov 24 2023: (Start)
T(n, 3^(n-1) - k) = T(n, k).
Sum_{k=0..3^(n-1)} T(n, k) = A199923(n).
Sum_{k=0..3^(n-1)} (-1)^k * T(n, k) = A000007(n). (End)
EXAMPLE
1
1, 1
3, 1, 1, 3
9, 1, 1, 3, 1, 1, 3, 1, 1, 9
MAPLE
seq(print(seq(gcd(k, 3^(n-1)), k=0..3^(n-1))), n=0..4);
MATHEMATICA
T[n_, k_]:= If[n==0, 1, GCD[k, 3^(n-1)]];
Table[T[n, k], {n, 0, 6}, {k, 0, 3^(n-1)}]//Flatten (* G. C. Greubel, Nov 24 2023 *)
PROG
(Magma) [1] cat [Gcd(k, 3^(n-1)): k in [0..3^(n-1)], n in [1..6]]; // G. C. Greubel, Nov 24 2023
(SageMath)
def A199922(n, k): return gcd(k, 3^(n-1)) + (2/3)*int(n==0)
flatten([[A199922(n, k) for k in range(int(3^(n-1))+1)] for n in range(7)]) # G. C. Greubel, Nov 24 2023
CROSSREFS
Sequence in context: A132740 A106621 A011085 * A112508 A260883 A088749
KEYWORD
nonn,tabf
AUTHOR
Peter Luschny, Nov 12 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 11:30 EDT 2024. Contains 372736 sequences. (Running on oeis4.)