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!)
A354538 a(n) is the least k such that A322523(k) = n. 1

%I #34 Oct 17 2022 19:13:08

%S 1,3,8,17,44,125,368,1097,3284,9845,29528,88577,265724,797165,2391488,

%T 7174457,21523364,64570085,193710248,581130737,1743392204

%N a(n) is the least k such that A322523(k) = n.

%C Linked to its derivation from A322523, this sequence has a natural description: "Given a series of boxes (starting at 0), put each positive integer, in sequence, in the first box in which it is not the sum of two different numbers already in that box. The sequence is the smallest number in each box."

%C The sequence and associated partition are closely related to powers of 3.

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (4,-3).

%F For n >= 2, a(n) = (3^n + 7)/2.

%F For n >= 0, the contents of the n-th box are (conjecture):

%F 1) All the positive integers == b(i) mod 3^(n+1) where 1 <= i <= 2^n and {b(i)} is some strictly increasing sequence of 2^n integers such that b(1)=a(n), b(2^n)= 5*3^(n-1).

%F 2) The additional 'misfit' entry 2*3^n.

%F [For the correctness and the formula and the conjecture see A322523. - _Jianing Song_, Oct 17 2022]

%e 1, 2 go in box 0 {1,2};

%e 3=1+2 so goes in box 1 {3};

%e 4 goes in box 0 {1,2,4};

%e 5=1+4 so goes in box 1 {3,5};

%e 6=2+4 so goes in box 1 {3,5,6};

%e 7 goes in box 0 {1,2,4,7};

%e 8=7+1=3+5 so goes in box 2 {8};

%e ...

%e Box 0: {1,2,4,7,10,13,16,19,22,...} = {1} mod 3 U misfit entry 2;

%e Box 1: {3,5,6,12,14,21,23,...} = {3,5} mod 9 U misfit entry 6;

%e Box 2: {{8,9,11,15} mod 27} U {18};

%e Box 3: {{17,20,24,26,27,29,33,45} mod 81} U {54};

%e ...

%o (Python)

%o from itertools import count

%o def A354538(n):

%o for k in count(1):

%o c, m = 0, k

%o while not (a:=divmod(m,3))[1]:

%o c += 1

%o m = a[0]

%o if not (m==2 or m%3==1):

%o c += 1

%o m = (m+1)//3-2

%o while (a:=divmod(m,3))[1]:

%o c += 1

%o m = a[0]

%o if c == n: return k # _Chai Wah Wu_, Oct 15 2022

%o def A354538(n): return (n<<1)+1 if n<2 else 3**n+7>>1 # based on formula, _Chai Wah Wu_, Oct 15 2022

%Y Cf. A322523.

%K nonn,easy

%O 0,2

%A _Hugh Williamson_, Aug 17 2022

%E a(7)-a(15) from _Michel Marcus_, Sep 23 2022

%E a(16)-a(20) from _Chai Wah Wu_, Oct 15 2022

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 02:29 EDT 2024. Contains 372720 sequences. (Running on oeis4.)