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!)
A007924 The number n written using the greedy algorithm in the base where the values of the places are 1 and primes. 9

%I #47 Jun 28 2017 11:27:04

%S 0,1,10,100,101,1000,1001,10000,10001,10010,10100,100000,100001,

%T 1000000,1000001,1000010,1000100,10000000,10000001,100000000,

%U 100000001,100000010,100000100,1000000000,1000000001,1000000010,1000000100,1000000101

%N The number n written using the greedy algorithm in the base where the values of the places are 1 and primes.

%C Any nonnegative number can be written as a sum of distinct primes + e, where e is 0 or 1.

%C Terms contain only digits 0 and 1.

%C Without the "greedy" condition there is ambiguity - for example 5 = 3+2 has two representations.

%D S. S. Pillai, "An arithmetical function concerning primes", Annamalai University Journal (1930), pp. 159-167.

%H John Cerkan, <a href="/A007924/b007924.txt">Table of n, a(n) for n = 0..5000</a>

%H K. Kashihara, <a href="http://www.gallup.unm.edu/~smarandache/Kashihara.pdf">Comments and Topics on Smarandache Notions and Problems</a>, Erhus University Press, 1996, 50 pages. See page 33.

%H K. Kashihara, <a href="/A011772/a011772.pdf">Comments and Topics on Smarandache Notions and Problems</a>, Erhus University Press, 1996, 50 pages. [Cached copy] See page 33.

%H Florian Luca & Ravindranathan Thangadurai, <a href="http://dx.doi.org/10.5802/jtnb.695">On an arithmetic function considered by Pillai</a>, Journal de théorie des nombres de Bordeaux 21:3 (2009), pp. 695-701.

%H C. Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_141.htm">Prime puzzle 78</a>

%H F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/OPNS.pdf">Only Problems, Not Solutions!</a>

%H F. Smarandache, <a href="http://www.gallup.unm.edu/~smarandache/Definitions-book.pdf">Definitions, Solved and Unsolved Problems, Conjectures, and Theorems in Number Theory and Geometry</a>, edited by M. Perez, Xiquan Publishing House 2000.

%F a(n) is the binary representation of b(n) = 2^pi(n) + b(n-p(pi(n))) for n > 0 and a(0) = b(0)= 0, where pi(k) = number of primes <= k (A000720) and p(k) = k-th prime (A008578). - _Frank Ellermann_, Dec 18 2001

%e 4 = 3 + 1, so a(4) = 101.

%t cprime[n_Integer] := (If[n==0, 1, Prime[n]]);gentable[n_Integer] := (m=n; ptable={};While[m!=0, (i=0; While[cprime[i]<=m, i++]; j=0;While[j<i, AppendTo[ptable, 0]; j++]; ptable[[i]]=1;m=m-cprime[i-1])]; ptable);decimal[n_Integer] := (gentable[n];Sum[2^(k-1)*ptable[[k]], {k, 1, Length[ptable]}]);Table[IntegerString[decimal[n], 2], {n, 0, 100}](* _Frank M Jackson_, Jan 06 2012 *)

%o (PARI) a(n)=if(n>1, my(p=precprime(n)); 10^primepi(p)+a(n-p), n) \\ _Charles R Greathouse IV_, Feb 01 2013

%Y Cf. A200947, A066352.

%Y Subsequence of A007088.

%K nonn,easy

%O 0,3

%A R. Muller

%E Additional references from _Felice Russo_, Sep 14 2001

%E Antedated to 1930 by _Charles R Greathouse IV_, Aug 28 2010

%E Definition clarified by _Frank M Jackson_ and _N. J. A. Sloane_, Dec 30 2011

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 19 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)