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

 

Logo

The OEIS is looking to hire part-time people to help edit core sequences, upload scanned documents, process citations, fix broken links, etc. - Neil Sloane, njasloane@gmail.com

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A012883 Numbers in which every prefix (in base 10) is 1 or a prime. 8
1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 53, 59, 71, 73, 79, 113, 131, 137, 139, 173, 179, 191, 193, 197, 199, 233, 239, 293, 311, 313, 317, 373, 379, 593, 599, 719, 733, 739, 797, 1319, 1373, 1399, 1733, 1913, 1931, 1933, 1973, 1979, 1993, 1997, 1999 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

T. D. Noe, Table of n, a(n) for n=1..147 (complete sequence)

MATHEMATICA

max = 10^10; truncate[p_] := If[q = Quotient[p, 10]; q == 1 || PrimeQ[q], q, p]; ok[p_] := FixedPoint[truncate, p] < 10; p = 1; cnt = 2; A012833 = Join[{1}, Reap[While[(p = NextPrime[p]) < max, If[ok[p], Print[cnt++, " ", p]; Sow[p]]]][[2, 1]]] (* Jean-Fran├žois Alcover, Nov 23 2015 *)

PROG

(PARI) for(n=1, 1e4, k=n; while(isprime(n) || n==1, c=n; n=(c-lift(Mod(c, 10)))/10); if(n==0, print1(k, ", ")); n=k) \\ Altug Alkan, Nov 23 2015

CROSSREFS

Cf. A024770 (every prefix is prime)

Sequence in context: A197298 A211654 A038612 * A171032 A171045 A222566

Adjacent sequences:  A012880 A012881 A012882 * A012884 A012885 A012886

KEYWORD

nonn,fini,full,nice,base

AUTHOR

Larry Calmer (larry(AT)wri.com), Simon Plouffe

EXTENSIONS

Last term is A094335(10) = 1979339339 (confirmed by David W. Wilson ).

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified May 26 09:12 EDT 2017. Contains 287093 sequences.