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!)
A304971 a(1) = 0, and for any n > 0, a(2*n) = a(n) + k(n) and a(2*n+1) = a(n) + 3 * k(n) where k(n) is the least positive integer not leading to a duplicate term in the sequence. 2
1, 2, 4, 3, 5, 6, 10, 7, 15, 8, 14, 11, 21, 12, 16, 9, 13, 18, 24, 17, 35, 19, 29, 20, 38, 23, 27, 22, 42, 25, 43, 26, 60, 28, 58, 30, 54, 31, 45, 32, 62, 37, 41, 33, 61, 34, 44, 36, 68, 47, 65, 39, 71, 40, 66, 46, 94, 49, 63, 50, 100, 51, 67, 48, 92, 64, 72 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Apparently every positive integer appears in the sequence.
LINKS
FORMULA
a(n) = (3*a(2*n) - a(2*n+1)) / 2.
EXAMPLE
The first terms, alongside k(n) and associate children, are:
n a(n) k(n) a(2*n) a(2*n+1)
-- ---- ---- ------ --------
1 1 1 2 4
2 2 1 3 5
3 4 2 6 10
4 3 4 7 15
5 5 3 8 14
6 6 5 11 21
7 10 2 12 16
8 7 2 9 13
9 15 3 18 24
10 8 9 17 35
PROG
(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]+3*k), a=concat(a, [a[n]+k
, a[n]+3*k]); s+=2^(a[n]+k) + 2^(a[n]+3*k); break))); a[1..nn]
CROSSREFS
This sequence is a variant of A305410.
Sequence in context: A338254 A132949 A275899 * A338252 A086434 A086433
KEYWORD
nonn,look,nice
AUTHOR
Rémy Sigrist, Dec 16 2018
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 April 24 08:59 EDT 2024. Contains 371935 sequences. (Running on oeis4.)