login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A103391 'Even' fractal sequence for the natural numbers: Deleting every even-index term results in the same sequence. 14

%I

%S 1,2,2,3,2,4,3,5,2,6,4,7,3,8,5,9,2,10,6,11,4,12,7,13,3,14,8,15,5,16,9,

%T 17,2,18,10,19,6,20,11,21,4,22,12,23,7,24,13,25,3,26,14,27,8,28,15,29,

%U 5,30,16,31,9,32,17,33,2,34,18,35,10,36,19,37,6,38,20,39,11,40,21,41,4,42,22,43,12,44,23,45,7,46,24,47,13,48,25,49,3,50,26,51,14,52,27,53,8

%N 'Even' fractal sequence for the natural numbers: Deleting every even-index term results in the same sequence.

%C A003602 is the 'odd' fractal sequence for the natural numbers.

%H Antti Karttunen, <a href="/A103391/b103391.txt">Table of n, a(n) for n = 1..65537</a> (terms 1..10000 from Reinhard Zumkeller)

%F For n>1, a(n) = A003602(n-1)+1. - _Benoit Cloitre_, May 26 2007, indexing corrected by _Antti Karttunen_, Feb 05 2020

%F a((2*n-3)*2^p+1) = n, p >= 0 and n >= 2, with a(1) = 1. - _Johannes W. Meijer_, Jan 28 2013

%p nmax := 82: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 2 to ceil(nmax/(p+2))+1 do a((2*n-3)*2^p+1) := n od: od: a(1) := 1: seq(a(n), n=1..nmax); # _Johannes W. Meijer_, Jan 28 2013

%o (Haskell)

%o -- import Data.List (transpose)

%o a103391 n = a103391_list !! (n-1)

%o a103391_list = 1 : ks where

%o ks = concat $ transpose [[2..], ks]

%o -- _Reinhard Zumkeller_, May 23 2013

%o (PARI)

%o A003602(n) = (n/2^valuation(n, 2)+1)/2; \\ From A003602

%o A103391(n) = if(1==n,1,(1+A003602(n-1))); \\ _Antti Karttunen_, Feb 05 2020

%Y Cf. A003602, A220466.

%Y Differs from A331743(n-1) for the first time at n=192, where a(192) = 97, while A331743(191) = 23.

%K easy,nonn

%O 1,2

%A _Eric Rowland_, Mar 20 2005

%E Data section extended up to a(105) to better differentiate from several nearby sequences. - _Antti Karttunen_, Feb 05 2020

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 19:07 EDT 2021. Contains 343746 sequences. (Running on oeis4.)