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-10 of 11 results. Next

A225885 Square numbers that remain square when their most-significant (or leftmost) digit is removed.

Original entry on oeis.org

1, 4, 9, 49, 64, 81, 100, 225, 400, 625, 900, 1225, 2025, 3025, 4225, 4900, 5625, 6400, 7225, 8100, 9025, 10000, 15625, 22500, 27225, 30625, 34225, 40000, 42025, 50625, 60025, 62500, 70225, 75625, 81225, 90000, 93025, 105625, 122500, 202500, 275625, 302500, 330625
Offset: 1

Views

Author

Keywords

Comments

The first three are the only terms not divisible by 25 (and thus, not ending in 00 or 25). If 100 is a term, then the sequence should start with 3 more initial terms, namely (1, 4, 9, ...) - M. F. Hasler, Nov 01 2014

Examples

			225 = 15^2 becomes 25 = 5^2, 105625 = 325^2 becomes 5625 = 75^2.
		

Crossrefs

Programs

  • Mathematica
    b^2 /. Flatten[Outer[Solve[a^2 + #2*10^#1 == b^2 && 0 <= a < Sqrt[10^#1] && Sqrt[#2*10^#1] <= b < Sqrt[10^(#1 + 1)], {a, b}, Integers] &, Range[0, 5], Range[9]], 2] (* Davin Park, Dec 30 2016 *)
  • PARI
    is_A225885(n)=issquare(n%10^(#Str(n)-1))&&issquare(n)&&n>9 \\ M. F. Hasler, Nov 01 2014
  • R
    no0<-function(s){ while(substr(s,1,1)=="0" & nchar(s)>1) s=substr(s,2,nchar(s)); s};
    issquare<-function(x) ifelse(as.bigz(x)<2,T,all(table(as.numeric(gmp::factorize(x)))%%2==0));
    which(sapply(1:200,function(x) issquare(no0(substr(x^2,2,ndig(x^2)))))>0)^2
    

Extensions

1,4,9 added (per M. F. Hasler's comment) by Chai Wah Wu, Nov 03 2014

A226090 Cubes that become prime when their most significant (or leftmost) digit is removed.

Original entry on oeis.org

27, 343, 729, 1331, 2197, 6859, 29791, 50653, 59319, 103823, 185193, 226981, 250047, 389017, 456533, 704969, 804357, 2048383, 2352637, 3869893, 5000211, 5929741, 9393931, 11697083, 13312053, 13651919, 14348907, 15813251, 19034163, 20346417, 24642171, 27818127
Offset: 1

Views

Author

Jonathan Vos Post, May 25 2013

Keywords

Comments

This is to A225873 as cubes A000578 are to squares A000290.

Examples

			a(1) = 27 because removing the leftmost digit gives 7, a prime.
a(8) = 50653 because removing the leftmost digit gives 0653 = 653, which is prime.
a(21) = 5000211 because removing the leftmost digit gives 000211 = 00211 = 0211 = 211, which is prime.
		

Crossrefs

Programs

  • PARI
    for(n=3,1e3,t=Vec(Str(n^3));if(isprime(eval(concat(t[2..#t]))),print1(n^3", "))) \\ Charles R Greathouse IV, Jun 10 2013
  • R
    library(gmp); no0<-function(s){ while(substr(s,1,1)=="0" & nchar(s)>1) s=substr(s,2,nchar(s)); s}; trimL=function(x) { x=as.character(x); ifelse(nchar(x)<2,0,no0(substr(x,2,nchar(x)))) }; y=as.bigz(rep(0,10000)); len=0; n=as.bigz(-1); while(len<10000) if(isprime(trimL((n=n+1)^3))) {y[(len=len+1)]=n^3; if(len%%100==0) cat(len,as.character(y[len]),"\n") }
    

A226354 Squares that become cubes when their rightmost digit is removed.

Original entry on oeis.org

1, 4, 9, 16, 81, 10000, 640000, 7290000, 40960000, 156250000, 188210961, 466560000, 1176490000, 2621440000, 5314410000, 10000000000, 17715610000, 29859840000, 48268090000, 75295360000, 113906250000, 167772160000, 241375690000, 340122240000, 470458810000
Offset: 1

Views

Author

Keywords

Examples

			188210961=13719^2, while 18821096=266^3.
		

Crossrefs

Programs

  • Mathematica
    cQ[n_]:=IntegerQ[Surd[FromDigits[Most[IntegerDigits[n]]],3]]; Select[Range[ 700000]^2,cQ] (* Harvey P. Dale, Feb 21 2014 *)
  • R
    trimR=function(x) { x=as.character(x); ifelse(nchar(x)<2,0,substr(x,1,nchar(x)-1)) }
    iscube<-function(x) ifelse(as.bigz(x)<2,T,all(table(as.numeric(factorize(x)))%%3==0))
    which(sapply(1:6400,function(x) iscube(trimR(x^2))))^2

Formula

For n > 11: a(n)=(100*(n-6)^3)^2 (188210961 is the last "exception" as is easy to prove with the help of the Nagell-Lutz theorem). - Reiner Moewald, Dec 30 2013

A249587 Numbers whose square remains square when the initial digit is removed.

Original entry on oeis.org

1, 2, 3, 7, 8, 9, 10, 15, 20, 25, 30, 35, 45, 55, 65, 70, 75, 80, 85, 90, 95, 100, 125, 150, 165, 175, 185, 200, 205, 225, 245, 250, 265, 275, 285, 300, 305, 325, 350, 450, 525, 550, 575, 650, 700, 750, 775, 800, 850, 900, 945, 950, 975, 985, 1000, 1025, 1250, 1425, 1500, 1650, 1750, 1825, 1850, 2000, 2050, 2225, 2250, 2450, 2500
Offset: 1

Views

Author

M. F. Hasler, Nov 01 2014

Keywords

Comments

The squares are in A225885.
The first three terms have a single-digit square which by convention yields 0 if the first digit is removed. The first 6 terms are the only terms of the sequence not divisible by 5.

Crossrefs

Cf. A225873. See also A227916.

Programs

  • Mathematica
    b /. Flatten[Outer[Solve[a^2 + #2*10^#1 == b^2 && 0 <= a < Sqrt[10^#1] && Sqrt[#2*10^#1] <= b < Sqrt[10^(#1 + 1)], {a, b}, Integers] &, Range[0, 5], Range[9]], 2] (* Davin Park, Dec 30 2016 *)
    Sqrt[#]&/@Select[Range[2500]^2,IntegerQ[Sqrt[FromDigits[ Rest[ IntegerDigits[ #]]]]]&] (* Harvey P. Dale, May 01 2017 *)
  • PARI
    is(n)=issquare(n^2%10^(#Str(n^2)-1))

A226092 Fourth powers that become prime when their most significant (leftmost) decimal digit is removed.

Original entry on oeis.org

2401, 279841, 15752961, 20151121, 35153041, 43046721, 62742241, 68574961, 88529281, 200533921, 260144641, 547981281, 671898241, 2385443281, 2655237841, 2750058481, 2847396321, 3262808641, 3722098081, 4640470641, 5887339441, 6414247921, 8428892481, 8882874001
Offset: 1

Views

Author

Jonathan Vos Post, May 26 2013

Keywords

Comments

This is to fourth powers A000583 as A226090 is to as cubes A000578, and as A225873 is to squares A000290.

Examples

			a(1) = 7^4 = 2401, because removing the leftmost digit (4) leaves 401, which is prime.
a(2) = 23^4 = 279841, because removing the leftmost digit (2) leaves 79841, which is prime.
a(3) = 63^4 = 15752961, because removing the leftmost digit (1) leaves 5752961, which is prime.
a(10) = 119^4 = 200533921, because removing the leftmost digit (2) leaves 00533921 = 533921, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[307]^4, PrimeQ@Mod[#, 10^IntegerLength@#/10] &] (* Giovanni Resta, May 26 2013 *)

Extensions

a(13)-a(24) from Giovanni Resta, May 26 2013

A226531 Cubes that become prime when their least-significant (rightmost) digit is removed.

Original entry on oeis.org

27, 3375, 4096, 4913, 35937, 97336, 110592, 148877, 421875, 681472, 1191016, 1442897, 1560896, 2628072, 3241792, 3581577, 3869893, 4741632, 5359375, 8998912, 10218313, 12649337, 16777216, 16974593, 21253933, 26730899, 31255875, 32157432, 43986977, 45882712
Offset: 1

Views

Author

Keywords

Examples

			4096 = 16^3, and becomes the prime number 409 when truncated.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000]^3,PrimeQ[Floor[#/10]]&] (* Harvey P. Dale, May 28 2021 *)
  • R
    library(gmp)trimR=function(x) { x=as.character(x); ifelse(nchar(x)<2,0,substr(x,1,nchar(x)-1)) }
    y=as.bigz(rep(0,10000)); len=0; n=as.bigz(-1)
    while(len<10000) if(isprime(trimR((n=n+1)^3))) y[(len=len+1)]=n^3

A249589 Numbers whose square with initial (= leftmost) digit removed is a prime.

Original entry on oeis.org

5, 17, 19, 21, 23, 27, 29, 31, 33, 39, 49, 51, 53, 69, 71, 77, 79, 87, 91, 97, 143, 147, 151, 157, 159, 163, 171, 173, 187, 191, 199, 201, 229, 231, 233, 239, 241, 243, 247, 251, 267, 279, 283, 293, 297, 301, 321, 333, 351, 357, 363, 369, 381, 393, 423, 447, 449, 453, 457, 463, 467, 469, 471, 477, 483, 491, 493, 501, 511, 517, 523
Offset: 1

Views

Author

M. F. Hasler, Nov 01 2014

Keywords

Comments

The squares are in A225873.

Crossrefs

Programs

  • Mathematica
    Select[Range[600],PrimeQ[FromDigits[Rest[IntegerDigits[#^2]]]]&] (* Harvey P. Dale, Dec 13 2015 *)
    b /. Flatten[Outer[Solve[a + #2*10^#1 == b^2 && 0 <= a < 10^#1 && Sqrt[#2*10^#1] <= b < Sqrt[10^(#1 + 1)] && a \[Element] Primes, {a, b}, Integers] &, Range[0, 5], Range[9]], 2] (* Davin Park, Dec 30 2016 *)
  • PARI
    is=(n)->isprime(n^2%10^(#Str(n^2)-1))

Extensions

Extended by Davin Park, Dec 30 2016

A226098 Fifth powers that become prime when their most significant (leftmost) decimal digit is removed.

Original entry on oeis.org

32, 243, 59049, 161051, 371293, 6436343, 14348907, 115856201, 282475249, 844596301, 73439775749, 173726604657, 312079600999, 779811265199, 2553954421743, 2817036000549, 3515706497843, 5798839393557, 10112638401999, 12914277518099, 14530697473149
Offset: 1

Views

Author

Jonathan Vos Post, May 26 2013

Keywords

Comments

This is to fifth powers A000584 as A226092 is to fourth powers A000583, as A226090 is to as cubes A000578, and as A225873 is to squares A000290.

Examples

			a(1) = 2^5 = 32 because when its most significant (or leftmost) digit (3) is removing the remaining 2 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[500]^5,PrimeQ[FromDigits[Rest[IntegerDigits[#]]]]&] (* Harvey P. Dale, Nov 10 2021 *)

A227936 Triangular numbers which become primes when their rightmost digit is removed.

Original entry on oeis.org

21, 28, 36, 55, 78, 136, 171, 190, 231, 378, 435, 595, 1035, 1275, 1378, 2278, 2415, 2775, 4095, 5778, 5995, 7875, 8778, 10878, 11175, 11935, 14535, 14878, 21115, 26335, 27495, 31375, 31878, 36315, 37675, 42195, 47895, 52975, 55278, 60378, 66795, 68635, 75078
Offset: 1

Views

Author

K. D. Bajpai, Oct 06 2013

Keywords

Examples

			a(3)=36: T(8)=36. Removing the rightmost digit gives 3, which is prime.
a(9)=231: T(21)=231. Removing the rightmost digit gives 23, which is prime.
		

Crossrefs

Programs

  • Maple
    KD := proc(n) local a, b, d; a :=n/2*(n+1);  b:=floor(a/10); if isprime(b) then return (a) end if; end proc: seq(KD(n), n=1..10);

A265211 Squares that become prime when their rightmost digit is removed.

Original entry on oeis.org

25, 36, 196, 676, 1936, 2116, 3136, 4096, 5476, 5776, 7396, 8836, 11236, 21316, 23716, 26896, 42436, 51076, 55696, 59536, 64516, 65536, 75076, 81796, 87616, 92416, 98596, 106276, 118336, 119716, 132496, 179776, 190096, 198916, 206116, 215296, 256036, 274576, 287296
Offset: 1

Views

Author

K. D. Bajpai, Dec 05 2015

Keywords

Comments

All the terms in this sequence, except a(1) end in digit 6.
All the terms except a(2) are congruent to 1 (mod 3).
All terms except a(1) are of the form 10*p+6 where p is a prime of the form 10*x^2 + 8*x + 1 or 10*x^2 + 12*x + 3. The Bunyakovsky conjecture implies that there are infinitely many of both of these types. - Robert Israel, Jan 12 2016

Examples

			196 = 14^2 becomes the prime 19 when its rightmost digit is removed.
3136 = 56^2 becomes the prime 313 when its rightmost digit is removed.
		

Crossrefs

Programs

  • Magma
    [k: n in [1..100] | IsPrime(Floor(k/10)) where k is n^2];
  • Maple
    select(t -> isprime(floor(t/10)), [seq(i^2, i=1..1000)]); # Robert Israel, Jan 12 2016
  • Mathematica
    A265211 = {}; Do[k = n^2; If[PrimeQ[Floor[k/10]], AppendTo[A265211 , k]], {n, 1500}]; A265211
    Select[Range[540]^2,PrimeQ[FromDigits[Most[IntegerDigits[#]]]]&] (* Harvey P. Dale, Aug 02 2016 *)
  • PARI
    for(n=1,1000, k=n^2; if(isprime(k\10), print1(k, ", ")));
    
Showing 1-10 of 11 results. Next