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.

A225873 Squares that become prime when their most significant (or leftmost) digit is removed.

Original entry on oeis.org

25, 289, 361, 441, 529, 729, 841, 961, 1089, 1521, 2401, 2601, 2809, 4761, 5041, 5929, 6241, 7569, 8281, 9409, 20449, 21609, 22801, 24649, 25281, 26569, 29241, 29929, 34969, 36481, 39601, 40401, 52441, 53361, 54289, 57121, 58081, 59049, 61009, 63001, 71289
Offset: 1

Views

Author

Keywords

Comments

a(1)=25 is the only term in the sequence that ends in 5. Proof: Any number ending in 5 is divisible by 5, and no square ending in 5 can have all 0 internal digits. Let N=A+B where A=N-5 and B=5. Then N^2 = A^2 + 2AB + B^2. B^2 is 25, and because A ends in a zero, A^2 and 2AB ends in two zeros; therefore the sum ends in 25.
All other terms end in 1 or 9, because no square ends in 3 or 7.
Observation: The sequence often experiences large gaps when the most-significant digit is square. For example, there is a gap of over 10^8 between a(764)=99420841 and a(765)=200307409, and over 10^9 between a(9156)=39980402401 and a(9157)=50000984881.
These gaps occur because if n^2 = (10^k*d+r)^2 = 10^(2k)d^2+r*(2*10^k+r) with d=1, 2, or 3 and r small enough so that the first digit of n^2 is d^2, then removing that digit d^2 we are left with r*(2*10^k+r) which is divisible by r and thus cannot be prime if r>1. - Giovanni Resta, May 23 2013
See A249589 for the square roots. - M. F. Hasler, Nov 02 2014

Examples

			2401 = 49^2 becomes the prime number 401 when 2 is removed. 5041 = 71^2 becomes the prime number 41 when 5 is removed.
		

Crossrefs

Cf. A225885.

Programs

  • Mathematica
    b^2 /. 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, 10], Range[9]], 2] (* Davin Park, Dec 30 2016 *)
  • PARI
    is_A225873(n)=isprime(n%10^(#Str(n)-1))&&issquare(n)
  • 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) isprime(no0(substr(x^2,2,ndig(x^2)))))>0)^2
    

Extensions

Extended by Davin Park, Dec 30 2016

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))

A249853 Numbers whose cubes become squares if one of their digits is deleted.

Original entry on oeis.org

4, 5, 6, 10, 20, 21, 25, 40, 44, 64, 90, 100, 129, 160, 200, 250, 360, 400, 490, 500, 600, 640, 810, 1000, 1210, 1440, 1690, 1960, 2000, 2025, 2100, 2250, 2500, 2560, 2890, 3240, 3610, 4000, 4400, 4410, 4840, 5025, 5290, 5760, 6250, 6400, 6760, 7290, 7840, 8410
Offset: 1

Views

Author

Paolo P. Lava, Nov 07 2014

Keywords

Comments

A245096 gives the numbers whose squares become cubes if one of their digit is deleted.
Numbers with single-digit cubes are not included. - Davin Park, Dec 30 2016

Examples

			21^3 = 9261 and sqrt(961) = 31.
44^3 = 85184 and sqrt(5184) = 72.
45625^3 = 94974853515625 and sqrt(9474853515625) = 3078125.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,k,n;
    for n from 1 to q do a:=n^3; for k from 1 to ilog10(a) do
    if type(sqrt(trunc(a/10^(k+1))*10^k+(a mod 10^k)),integer)
    then print(n); break; fi; od; od; end: P(10^9);
  • Mathematica
    f[n_] := !MissingQ@SelectFirst[Delete[IntegerDigits[n^3], #] & /@ Range[IntegerLength[n^3]], IntegerQ@Sqrt@FromDigits@# &];
    Select[Range[4, 1000], f] (* Davin Park, Dec 30 2016 *)

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

A247267 Square numbers not divisible by 100 that remain square when their most-significant (or leftmost) digit is removed.

Original entry on oeis.org

1, 4, 9, 49, 64, 81, 225, 625, 1225, 2025, 3025, 4225, 5625, 7225, 9025, 15625, 27225, 30625, 34225, 42025, 50625, 60025, 70225, 75625, 81225, 93025, 105625, 275625, 330625, 600625, 893025, 950625, 970225, 1050625, 2030625, 3330625, 4950625, 9455625, 9765625, 15405625
Offset: 1

Views

Author

Chai Wah Wu, Nov 01 2014

Keywords

Comments

Subsequence of A225885. It is easy to see that the multiples of 100 in A225885 are earlier entries of the sequence multiplied by 100, so this sequence removes this redundancy in some sense. It appears that all entries in A225885 after the first 3 entries ends in either 25 or 00, so this sequence appears to end in 25 after the first 3 entries.

Crossrefs

Programs

  • PARI
    for(n=10,10^6,if(n%100,if(issquare(n)&&issquare(n%(10^(#Str(n)-1))),print1(n,", ")))) \\ Derek Orr, Nov 01 2014

Extensions

Added 1, 4, 9 to sequence to match A225885 - Chai Wah Wu, Nov 03 2014

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);

A245371 Square numbers that remain square when their 2 most-significant (or leftmost) digits in base 10 are removed.

Original entry on oeis.org

16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 289, 324, 361, 400, 441, 484, 529, 729, 784, 841, 900, 961, 1225, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500, 2601, 2704, 2809, 2916, 3025, 3136, 3249, 3364, 3481, 3600, 4225, 4900, 5625, 6400
Offset: 1

Views

Author

Chai Wah Wu, Nov 14 2014

Keywords

Examples

			9150625 and 50625 are both squares.
		

Crossrefs

Cf. A225885.

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