login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Write numbers 0, 1, 2, ... in binary under each other, right-adjusted; shift the 2^k's column upwards by prime(k+1) places (for k >= 0); read the resulting array across rows starting at the (old) zero row; convert to decimal.
0

%I #11 Sep 08 2013 19:54:50

%S 6,13,12,11,10,25,24,31,30,21,20,19,18,17,16,23,22,29,28,59,58,41,40,

%T 47,46,37,36,35,34,33,32,39,38,45,44,43,42,57,56,63,62,53,52,51,50,49,

%U 48,119,118,125,124,91,90,73,72,79,78,69,68,67,66,65,64,71,70,77,76,75,74

%N Write numbers 0, 1, 2, ... in binary under each other, right-adjusted; shift the 2^k's column upwards by prime(k+1) places (for k >= 0); read the resulting array across rows starting at the (old) zero row; convert to decimal.

%H David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [<a href="http://neilsloane.com/doc/slopey.pdf">pdf</a>, <a href="http://neilsloane.com/doc/slopey.ps">ps</a>].

%F a(n) = Sum_{k >= 0} 2^k*(1-(-1)^floor((n+prime(k+1))/2^k))/2.

%e The array before the columns are shifted upwards:

%e --------- <- the "zero" line

%e ....00000

%e ....00001

%e ....00010

%e ....00011

%e ....00100

%e ....00101

%e ....00110

%e ....00111

%e ....01000

%e .........

%e After the upwards shifts:

%e ....0

%e ....0

%e ....0

%e ....0

%e ....00

%e ....00

%e ....000

%e ....000

%e ....0000

%e ....00000

%e ....00111

%e --------- <- the "zero" line

%e ....00110 = 6

%e ....01101 = 13

%e ....01100 = 12

%e ....01011 = 11

%e ....01010 = 10

%e ....11001 = 25

%e ....11000 = 24

%e ....11111 = 31

%e ....11110 = 30

%e .........

%o (PARI) {a(n) = local(s, m, k); s=0;k=0;while(1,m=floor((n+prime(k+1))/2^k);if(m==0,return(s));if(m%2,s+=2^k);k++)} (Alekseyev)

%Y Cf. A102370.

%K nonn,easy,base

%O 0,1

%A _N. J. A. Sloane_ and _Philippe Deléham_, Feb 13 2005

%E More terms from _Max Alekseyev_, May 17 2005