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!)
A305410 a(1) = 1, and for any n > 0, a(2*n) = a(n) + k(n) and a(2*n+1) = a(n) + 2 * k(n) where k(n) is the least positive integer not leading to a duplicate term. 4

%I #33 Apr 26 2020 07:40:33

%S 1,2,3,4,6,5,7,8,12,10,14,9,13,11,15,16,24,17,22,18,26,21,28,19,29,20,

%T 27,23,35,30,45,25,34,31,38,32,47,33,44,36,54,37,48,39,57,40,52,41,63,

%U 42,55,43,66,46,65,49,75,51,67,50,70,53,61,56,87,58,82

%N a(1) = 1, and for any n > 0, a(2*n) = a(n) + k(n) and a(2*n+1) = a(n) + 2 * k(n) where k(n) is the least positive integer not leading to a duplicate term.

%C Apparently, every positive integer appears in the sequence.

%H Rémy Sigrist, <a href="/A305410/b305410.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A305410/a305410.png">Scatterplot of (n, a(n)) for n = 1..10000000</a>

%F a(n) = 2*a(2*n) - a(2*n + 1).

%e The first terms, alongside k(n) and associate children, are:

%e n a(n) k(n) a(2*n) a(2*n+1)

%e -- ---- ---- ------ --------

%e 1 1 1 2 3

%e 2 2 2 4 6

%e 3 3 2 5 7

%e 4 4 4 8 12

%e 5 6 4 10 14

%e 6 5 4 9 13

%e 7 7 4 11 15

%e 8 8 8 16 24

%e 9 12 5 17 22

%e 10 10 8 18 26

%o (PARI) lista(nn) = my (a=[1], s=2^a[1]); for (n=1, ceil(nn/2), for (k=1, oo, if (!bittest(s, a[n]+k) && !bittest(s, a[n]+2*k), a=concat(a, [a[n]+k

%o , a[n]+2*k]); s+=2^(a[n]+k) + 2^(a[n]+2*k); break))); a[1..nn]

%Y This sequence is a variant of A322510.

%K nonn

%O 1,2

%A _Rémy Sigrist_, Dec 16 2018

%E Name corrected by _Rémy Sigrist_, Apr 26 2020

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 April 28 11:08 EDT 2024. Contains 372041 sequences. (Running on oeis4.)