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-9 of 9 results.

A276697 Integers m such that A048390(m) is a cube.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1000, 1042, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 321213, 642426, 1000000, 1042000, 2000000, 3000000, 4000000, 5000000, 6000000, 7000000, 8000000, 9000000, 10121026, 302102103, 321213000, 604204206, 642426000, 1000000000
Offset: 1

Views

Author

Michel Marcus, Nov 06 2016

Keywords

Comments

Integers that become cubes when their digits d are replaced with d^3.
Sequence is infinite, since 10^(3*k) is a term for all k.

Examples

			For m <= 9, 1-digit integers, A048390(m) = m^3 so all integers <= 9 are terms of this sequence.
		

Crossrefs

Programs

  • Magma
    f:=func; [0] cat [k:k in [1..8000000]|IsPower(f(k),3)]; // Marius A. Burtea, Feb 13 2020
  • PARI
    isok(n) = my(d = digits(n)); my(s = ""); for (k=1, #d, s = concat(s, Str(d[k]^3))); ispower(eval(s), 3);
    

Extensions

a(34)-a(38) from Jinyuan Wang, Feb 13 2020

A048393 Replacing digits d in decimal expansion of n with d^3 yields a prime.

Original entry on oeis.org

11, 13, 23, 31, 41, 43, 53, 61, 73, 101, 107, 109, 121, 137, 143, 149, 151, 157, 161, 169, 173, 181, 191, 211, 217, 221, 229, 233, 241, 253, 257, 259, 271, 277, 281, 299, 307, 311, 313, 319, 323, 331, 421, 427, 431, 449, 469, 493, 511, 527, 541, 577, 589
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Examples

			313 = (3)(1)(3) -> (27)(1)(27) = 27127, which is a prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[600],PrimeQ[FromDigits[Flatten[IntegerDigits/@ (IntegerDigits[ #]^3)]]]&] (* Harvey P. Dale, Jan 27 2015 *)
  • Python
    from sympy import primerange, isprime
    for n in primerange(2,600):
        t=int(''.join(str(int(i)**3) for i in str(n)))
        if sympy.isprime(t):
             print(n)
    # Abhiram R Devesh, Feb 09 2015

Extensions

Offset corrected by Michel Marcus, Oct 19 2016

A048391 Replacing digits d in decimal expansion of n with d^3 yields a square.

Original entry on oeis.org

0, 1, 4, 9, 21, 100, 400, 561, 900, 2100, 8821, 10000, 11221, 17821, 40000, 56100, 73221, 90000, 210000, 211201, 518041, 882100, 1000000, 1001614, 1002621, 1012021, 1012224, 1122100, 1302801, 1782100, 4000000, 5012214, 5610000
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Examples

			E.g. 518041 = (5)(1)(8)(0)(4)(1) -> (125)(1)(512)(0)(64)(1) = 12515120641 = 111871^2 and a square.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,561*10^4],IntegerQ[Sqrt[FromDigits[Flatten[ IntegerDigits/@ (IntegerDigits[ #]^3)]]]]&] (* Harvey P. Dale, Apr 15 2019 *)
  • PARI
    ccd(n) = {if (n==0, return(0)); my(d = digits(n)); my(nd = ""); for (i=1, #d, nd = Str(nd, d[i]^3);); eval(nd);}
    isok(n) = issquare(ccd(n)); \\ Michel Marcus, Oct 19 2016

Extensions

Offset corrected by Michel Marcus, Oct 19 2016

A048392 Squares resulting from procedure described in A048391.

Original entry on oeis.org

0, 1, 64, 729, 81, 100, 6400, 1252161, 72900, 8100, 51251281, 10000, 11881, 134351281, 640000, 125216100, 34327881, 7290000, 810000, 811801, 12515120641, 5125128100, 1000000, 1001216164, 100821681, 1018081, 10188864, 1188100
Offset: 1

Views

Author

Patrick De Geest, Mar 15 1999

Keywords

Crossrefs

Extensions

Offset corrected by Michel Marcus, Oct 19 2016

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

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

A277047 Number obtained by concatenating the cubes of the digits of prime(n).

Original entry on oeis.org

8, 27, 125, 343, 11, 127, 1343, 1729, 827, 8729, 271, 27343, 641, 6427, 64343, 12527, 125729, 2161, 216343, 3431, 34327, 343729, 51227, 512729, 729343, 101, 1027, 10343, 10729, 1127, 18343, 1271, 127343, 127729, 164729, 11251, 1125343, 121627, 1216343
Offset: 1

Views

Author

Vincenzo Librandi, Oct 17 2016

Keywords

Examples

			For n = 7, prime(7) = 17 and a(7) = 1343, which is the concatenation of the cubes of the digits of 17.
		

Crossrefs

Programs

  • Magma
    [StringToInteger(&cat[IntegerToString(h): h in Reverse([i^3: i in Intseq(p)])]): p in PrimesUpTo(250)];
  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits/@(IntegerDigits[Prime[n]]^3)]], {n, 50}]

Formula

a(n) = A048390(A000040(n)).

A296563 Yarborough primes that remain Yarborough primes when each of their digits are replaced by their cubes.

Original entry on oeis.org

23, 43, 73, 229, 233, 277, 449, 773, 937, 947, 2239, 2243, 2297, 2377, 2777, 3299, 3449, 3727, 3943, 4243, 4423, 4493, 7393, 7723, 7927, 7949, 9227, 9743, 9749, 22277, 22727, 22777, 22943, 23327, 23399, 23497, 23747, 24473, 24733, 27239, 27277, 27427, 27799, 29347
Offset: 1

Views

Author

K. D. Bajpai, Feb 15 2018

Keywords

Comments

A Yarborough prime is a prime that does not contain digits 0 or 1.

Examples

			a(1) = 23 is a prime, and replacing each of its digits by its cube yields 827, which is also prime. Neither 23 nor 827 contains digits 0 or 1, so both are Yarborough primes.
a(4) = 229 is a prime, and replacing each of its digits by its cube gives 88729, which is also prime. Neither 229 nor 88729 contains digits 0 or 1, so both are Yarborough primes.
29 is a Yarborough prime but 8729 = 7 * 29 * 43, so 29 is not in the sequence.
53 is a Yarborough prime; 12527 is also a prime but not a Yarborough prime (contains digit 1). Hence, 53 is not included in this sequence.
		

Crossrefs

Cf. A106116 (Yarborough primes), A296187 (digits to squares), A048390, A277047.

Programs

  • Mathematica
    k = 3; Select[Prime[Range[10000]], Min[IntegerDigits[#]] > 1 && Min[IntegerDigits[Flatten[IntegerDigits[(IntegerDigits[#]^k)]]]] > 1 && PrimeQ[FromDigits[Flatten[IntegerDigits[(IntegerDigits[#]^k)]]]] &]

Formula

{A106116(k): A048390(A106116(k)) in A106116} . - R. J. Mathar, May 04 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
Showing 1-9 of 9 results.