cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A048394 Primes resulting from procedure described in A048393.

Original entry on oeis.org

11, 127, 827, 271, 641, 6427, 12527, 2161, 34327, 101, 10343, 10729, 181, 127343, 16427, 164729, 11251, 1125343, 12161, 1216729, 134327, 15121, 17291, 811, 81343, 881, 88729, 82727, 8641, 812527, 8125343, 8125729, 83431, 8343343, 85121
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Crossrefs

A048390 Digits d in decimal expansion of n replaced with d^3.

Original entry on oeis.org

0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 10, 11, 18, 127, 164, 1125, 1216, 1343, 1512, 1729, 80, 81, 88, 827, 864, 8125, 8216, 8343, 8512, 8729, 270, 271, 278, 2727, 2764, 27125, 27216, 27343, 27512, 27729, 640, 641, 648, 6427, 6464, 64125, 64216, 64343
Offset: 0

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [StringToInteger(&cat[IntegerToString(h): h in Reverse([i^3: i in Intseq(n)])]): n in [1..50]]; // Vincenzo Librandi, Mar 12 2013
    
  • Mathematica
    FromDigits[Flatten[IntegerDigits/@(IntegerDigits[#]^3)]]&/@ Range[0,50] (* Harvey P. Dale, Jun 04 2011 *)
  • PARI
    a(n) = my(d = digits(n)); my(s = ""); for (k=1, #d, s = concat(s, Str(d[k]^3))); eval(s); \\ Michel Marcus, Nov 06 2016

A316604 Replacing each digit d in decimal expansion of n with d^2 yields a new prime when done recursively three times.

Original entry on oeis.org

11, 101, 131, 133, 1013, 2111, 2619, 3173, 3301, 4111, 5907, 8463, 9101, 10033, 10111, 12881, 13833, 14021, 14821, 15443, 16771, 17501, 17831, 18621, 21519, 21567, 28609, 29309, 31133, 31233, 33131, 41621, 42621, 44181, 44421, 44669, 45921, 52707, 55847, 59023
Offset: 1

Views

Author

K. D. Bajpai, Jul 08 2018

Keywords

Examples

			2619 is a term because replacing each digit d by d^2, recursively three times, a prime number is obtained: 2619 -> 436181 (prime); 436181 -> 169361641 (prime); 169361641 -> 13681936136161 (prime).
3173 is a term because replacing each digit d by d^2, recursively three times, a prime number is obtained: 3173 -> 91499 (prime); 91499 -> 811168181 (prime); 811168181 -> 6411136641641 (prime).
		

Crossrefs

Programs

  • Mathematica
    A316604 = {}; Do[ a=FromDigits[Flatten[IntegerDigits /@ (IntegerDigits[n]^2)]]; b=FromDigits[Flatten[IntegerDigits /@ (IntegerDigits[a]^2)]]; c=FromDigits[Flatten[IntegerDigits /@ (IntegerDigits[b]^2)]]; If[PrimeQ[a] && PrimeQ[b] && PrimeQ[c], AppendTo[A316604,n]], {n,100000}]; A316604
  • PARI
    replace_digits(n) = my(d=digits(n), s=""); for(k=1, #d, s=concat(s, d[k]^2)); eval(s)
    is(n) = my(x=n, i=0); while(1, x=replace_digits(x); if(!ispseudoprime(x), return(0), i++); if(i==3, return(1))) \\ Felix Fröhlich, Jul 08 2018

A316982 Numbers k such that replacing each digit d in the decimal expansion of k with d^3 yields a prime each time, when done recursively three times.

Original entry on oeis.org

11, 31, 101, 173, 1307, 1873, 10111, 11923, 12209, 14767, 20357, 20729, 21149, 22003, 22151, 29261, 43681, 43891, 52033, 52211, 55231, 58121, 65011, 70027, 70399, 80569, 100087, 101111, 101401, 102079, 102113, 120091, 151931, 163669, 172001, 200501, 201113, 203831
Offset: 1

Views

Author

K. D. Bajpai, Jul 18 2018

Keywords

Examples

			173 is a term because replacing each digit d with d^3, recursively three times, a prime number is obtained: 173 -> 134327 (prime); 134327 -> 12764278343 (prime); 12764278343 -> 18343216648343512276427 (prime).
1873 is a term because replacing each digit d with d^3, recursively three times, a prime number is obtained: 1873 -> 151234327 (prime); 151234327 -> 1125182764278343 (prime); 1125182764278343 -> 11812515128343216648343512276427 (prime).
		

Crossrefs

A004022 is a subsequence.

Programs

  • Mathematica
    A316982 = {}; Do[a=FromDigits[Flatten[IntegerDigits /@ (IntegerDigits[n]^3)]]; b=FromDigits[Flatten[IntegerDigits /@ (IntegerDigits[a]^3)]]; c=FromDigits[Flatten[IntegerDigits /@ (IntegerDigits[b]^3)]]; If[PrimeQ[a] && PrimeQ[b] && PrimeQ[c], AppendTo[A316982, n]], {n,300000}]; A316982 (* or *)
    c[n_] := FromDigits@ Flatten@ IntegerDigits[IntegerDigits[n]^3]; Select[Range[204000], PrimeQ[x = c@#] && PrimeQ[y = c@x] && PrimeQ@c@y &] (* Giovanni Resta, Jul 18 2018 *)
    p3[n_]:=Rest[NestList[FromDigits[Flatten[IntegerDigits/@(IntegerDigits[#]^3)]]&,n,3]]; Select[Range[205000],AllTrue[p3[#],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 11 2019 *)
  • PARI
    eva(n) = subst(Pol(n), x, 10)
    replace_digits(n) = my(d=digits(n), e=[]); for(x=1, #d, my(f=digits(d[x]^3)); if(f==[], e=concat(e, [0]), for(y=1, #f, e=concat(e, f[y])))); eva(e)
    is(n) = my(x=n, i=0); while(i < 3, x=replace_digits(x); if(!ispseudoprime(x), break, i++)); i >= 3 \\ Felix Fröhlich, Oct 24 2018

A254928 Smallest (nontrivial) prime that, for each k from 2 to n, remains prime when each digit is replaced by the digit's k-th power.

Original entry on oeis.org

13, 13, 13, 137, 157163, 153391501, 153391501, 1126903901803
Offset: 2

Views

Author

Abhiram R Devesh, May 04 2015

Keywords

Comments

Examples of trivial primes are 11, 101, etc, i.e., all primes in the sequence A020449: these generate themselves for all powers. These primes are excluded, otherwise all terms would be 11 since sequence wants smallest primes.

Examples

			a(5) = 137; (1^k)&(3^k)&(7^k), where "&" represents concatenation of numbers:
for k=2, 1949 (prime), for k=3, 127343 (prime),
for k=4, 1812401 (prime), for k=5, 124316807 (prime).
		

Crossrefs

Cf. A020449 (primes that contain digits 0 and 1 only).
Cf. A068492 (primes that remain prime after each digit is replaced by its square).
Cf. A048393 (replacing digits d in decimal expansion of n with d^3 yields a prime).

Extensions

a(9) from Giovanni Resta, May 19 2015
Showing 1-5 of 5 results.