The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A342932 The unique sequence {a(1), a(2), a(3), a(4), ...} of digits 1, 2, or 3 such that the number a(n)a(n-1)...a(2)a(1), read in base 6, is divisible by 3^n. 1
 3, 1, 2, 3, 3, 1, 1, 3, 1, 2, 2, 1, 1, 3, 1, 3, 1, 3, 3, 3, 2, 3, 3, 2, 1, 1, 2, 1, 3, 1, 2, 1, 1, 3, 3, 2, 2, 3, 1, 3, 2, 2, 2, 3, 3, 1, 2, 2, 2, 2, 2, 1, 3, 2, 2, 3, 2, 2, 1, 2, 1, 3, 2, 2, 3, 1, 1, 1, 1, 1, 3, 2, 2, 2, 3, 3, 2, 1, 3, 1, 1, 2, 2, 3, 1, 3, 2, 3, 2, 3, 1, 1, 3, 1, 2, 3, 3, 2, 3, 2, 3, 1, 1, 2, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS The distribution seems to be uniform but random (empirical observation). To prove that such a digit sequence exists and is unique is a good (but uncommon) example of a proof by induction. LINKS Table of n, a(n) for n=1..105. Rémy Sigrist, Colored scatterplot of (n, 3*o(n)-n) for = 1..1000000 (where o corresponds to the ordinal transform of the sequence) Eugen Ionascu, Mathematica File EXAMPLE 3 is divisible by 3^1; 13_6 = 1*6 + 3 = 9, which is divisible by 3^2, 213_6 = 2*6^2 + 1*6 + 3 = 81, which is divisible by 3^3. MATHEMATICA nd[n_] := Module[{k, i, s, ss, L, a}, L = Array[f, n]; f[1] = 3; Do[s = Sum[6^(k - 1)*f[k], {k, 1, i - 1}]; ss = Mod[2^(i - 1)*s/3^(i - 1), 3]; If[ss == 0, f[i] = 3, If[ss == 1, f[i] = 2, f[i] = 1]], {i, 2, n}]; s = Sum[6^(k - 1)*f[k], {k, 1, n}]; {L, s/3^n}] PROG (Python) n, div, divnum = 0, 1, 0 while n < 87: div, a = 3*div, 1 while (a*6**n+divnum)%div != 0: a = a+1 divnum, n = divnum+a*6**n, n+1 print(a, end=', ') # A.H.M. Smeets, Apr 13 2021 (PARI) { q=0; t=1; for (n=1, 105, print1 (d=[3, 1, 2][1+lift(-q/Mod(t, 3))]", "); q=(t*d+q)/3; t*=2) } \\ Rémy Sigrist, Apr 15 2021 CROSSREFS Cf. A023396, A053312, A126933. Sequence in context: A165084 A029279 A274514 * A026181 A327239 A322849 Adjacent sequences: A342929 A342930 A342931 * A342933 A342934 A342935 KEYWORD nonn,base AUTHOR Eugen Ionascu, Mar 29 2021 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.

Last modified August 3 18:06 EDT 2024. Contains 374899 sequences. (Running on oeis4.)