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

 

Logo

Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048986 Home primes in base 2: primes reached when you start with n and (working in base 2) concatenate its prime factors (A048985); repeat until a prime is reached (or -1 if no prime is ever reached). Answer is written in base 10. 5
1, 2, 3, 31, 5, 11, 7, 179, 29, 31, 11, 43, 13, 23, 29, 12007, 17, 47, 19, 251, 31, 43, 23, 499, 4091, 4091, 127, 4091, 29, 127, 31, 1564237, 59, 4079, 47, 367, 37, 83, 61, 383, 41, 179, 43, 499, 4091, 4091, 47, 683, 127, 173, 113, 173, 53, 191, 4091 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(1) = 1 by convention.

LINKS

Table of n, a(n) for n=1..55.

P. De Geest, Home Primes

EXAMPLE

4 = 2*2 -> 1010 = 10 = 2*5 ->10101 = 21 = 3*7 -> 11111 = 31 = prime.

MATHEMATICA

f[n_] := Module[{fi}, If[PrimeQ[n], n, fi = FactorInteger[n]; Table[ First[#], {Last[#]}]& /@ fi // Flatten // IntegerDigits[#, 2]& // Flatten // FromDigits[#, 2]&]]; a[1] = 1; a[n_] := TimeConstrained[FixedPoint[f, n], 1] /. $Aborted -> -1; Array[a, 55] (* Jean-Fran├žois Alcover, Jan 01 2016 *)

CROSSREFS

Cf. A048985, A037274, A049065.

Sequence in context: A217370 A088115 A230627 * A093712 A035514 A114009

Adjacent sequences:  A048983 A048984 A048985 * A048987 A048988 A048989

KEYWORD

nonn,base,nice

AUTHOR

Michael B Greenwald (mbgreen(AT)central.cis.upenn.edu)

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 December 7 11:34 EST 2016. Contains 278874 sequences.