login
This site is supported by donations to The OEIS Foundation.

 

Logo

The OEIS Foundation is grateful to everyone who made a donation during our Annual Appeal.     Visit the new and spectacular Pictures from the OEIS page!

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. 8
0, 1, 10, 100, 101, 1000, 1001, 10000, 10001, 10010, 10100, 100000, 100001, 1000000, 1000001, 1000010, 1000100, 10000000, 10000001, 100000000, 100000001, 100000010, 100000100, 1000000000, 1000000001, 1000000010, 1000000100, 1000000101 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

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

Terms contain only digits 0 and 1.

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

REFERENCES

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

LINKS

Table of n, a(n) for n=0..27.

Florian Luca & Ravindranathan Thangadurai, On an arithmetic function considered by Pillai, Journal de théorie des nombres de Bordeaux 21:3 (2009), pp. 695-701.

C. Rivera, Prime puzzle 78

F. Smarandache, Only Problems, Not Solutions!

F. Smarandache, Definitions, Solved and Unsolved Problems, Conjectures, and Theorems in Number Theory and Geometry, edited by M. Perez, Xiquan Publishing House 2000.

FORMULA

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

EXAMPLE

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

MATHEMATICA

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 *)

PROG

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

CROSSREFS

Cf. A200947, A066352.

Sequence in context: A014417 A211027 A185101 * A115794 A105424 A115832

Adjacent sequences:  A007921 A007922 A007923 * A007925 A007926 A007927

KEYWORD

nonn,easy

AUTHOR

R. Muller

EXTENSIONS

Additional references from Felice Russo, Sep 14 2001

Antedated to 1930 by Charles R Greathouse IV, Aug 28 2010

Definition clarified by Frank M Jackson and N. J. A. Sloane, Dec 30 2011

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified February 9 21:06 EST 2016. Contains 268138 sequences.