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 10 results.

A158125 Weakly prime numbers in the sense of A158124 but not A050249.

Original entry on oeis.org

929573, 3070663, 5285767, 5974249, 7810223, 9262697, 9663683, 9700429, 10532453, 12968519, 19106729, 19158221, 19579907, 21825337, 23196157, 24328567, 29617897, 31181461, 31746383, 31839427, 36438379, 36745811, 37763641, 38585039, 38774851, 38888137, 39600559, 45412331, 45743483, 47500217, 47632271, 54127231, 56242891, 59816347
Offset: 1

Views

Author

Eric W. Weisstein, Mar 13 2009

Keywords

Comments

A158124: initial digit may not be changed to a zero (and hence give a number with fewer digits).
A050249: initial digit may be changed to a zero.
For the following values 5, 6, 7, 8, 9, 10 of k, the number of terms < 10^k in this sequence is 0, 1, 8, 72, 589, 4977. - Jean-Marc Rebert, Nov 10 2015
Intersection of A227916 and A158124. So primes p that give another prime when the first digit is removed, but give a composite number when any one digit is modified in a way that does not change the digit count. - Jeppe Stig Nielsen, Jan 16 2022

Crossrefs

Programs

  • PARI
    forprime(p=2,10^10,d=digits(p);!isprime(fromdigits(d[2..#d]))&&next();for(k=1,#d,for(j=(k==1),9,d[k]==j&&next();e=d;e[k]=j;isprime(fromdigits(e))&&next(3)));print1(p,", ")) \\ Jeppe Stig Nielsen, Jan 16 2022

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

A235687 Semiprimes which remain semiprimes when the rightmost digit is removed.

Original entry on oeis.org

46, 49, 62, 65, 69, 91, 93, 94, 95, 106, 141, 142, 143, 145, 146, 155, 158, 159, 213, 214, 215, 217, 218, 219, 221, 226, 253, 254, 259, 262, 265, 267, 334, 335, 339, 341, 346, 355, 358, 381, 382, 386, 391, 393, 394, 395, 398, 466, 469, 493, 497, 511, 514
Offset: 1

Views

Author

Colin Barker, Jan 14 2014

Keywords

Examples

			514 is in the sequence because 51 = 3*17.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[600],PrimeOmega[#]==2==PrimeOmega[FromDigits[ Most[ IntegerDigits[ #]]]]&] (* Harvey P. Dale, Oct 02 2014 *)
    Select[Range[600],PrimeOmega[#]==PrimeOmega[Quotient[#,10]]==2&] (* Harvey P. Dale, Mar 18 2023 *)
  • PARI
    list(lim)=my(v=List(), t); forprime(p=2, sqrt(lim), t=p; forprime(q=p, lim\t, listput(v, t*q))); vecsort(Vec(v)) \\ From A001358
    issemiprime(n) = n>0 && bigomega(n)==2
    t=list(1000); for(n=1, #t, if(issemiprime(t[n]\10), print1(t[n],", ")))

A235688 Semiprimes which remain semiprimes when the leftmost digit is removed.

Original entry on oeis.org

14, 26, 34, 39, 46, 49, 69, 74, 86, 94, 106, 115, 121, 122, 133, 134, 146, 155, 158, 169, 177, 185, 187, 194, 206, 209, 214, 215, 221, 226, 235, 249, 262, 265, 274, 287, 291, 295, 309, 314, 321, 326, 334, 335, 339, 346, 355, 358, 362, 365, 377, 382, 386, 391
Offset: 1

Views

Author

Colin Barker, Jan 14 2014

Keywords

Examples

			249 is in the sequence because 49 = 7*7.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[400],PrimeOmega[#]==PrimeOmega[Mod[#,10^(IntegerLength[ #]-1)]] == 2&] (* Harvey P. Dale, Jun 07 2017 *)
  • PARI
    list(lim)=my(v=List(), t); forprime(p=2, sqrt(lim), t=p; forprime(q=p, lim\t, listput(v, t*q))); vecsort(Vec(v)) \\ From A001358
    delleft(a) = my(b, c); b=#Str(a); c=a\(10^(b-1)); a-c*(10^(b-1))
    issemiprime(n) = n>0 && bigomega(n)==2
    t=list(500); for(n=1, #t, if(issemiprime(delleft(t[n])), print1(t[n],", ")))

A234901 Primes which remain prime when the digits are rotated once to the right.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, 97, 113, 131, 173, 197, 199, 271, 277, 311, 313, 337, 373, 379, 397, 419, 479, 491, 571, 577, 593, 617, 631, 673, 719, 733, 811, 839, 877, 911, 919, 971, 977, 991, 1031, 1039, 1091, 1093, 1097, 1171, 1193, 1213
Offset: 1

Views

Author

Colin Barker, Jan 01 2014

Keywords

Examples

			The prime 1097 is in the list because 7109 is also prime.
		

Crossrefs

Programs

  • Magma
    r:=func; [p: p in PrimesUpTo(1300) | IsPrime(r(p))]; // Bruno Berselli, Jul 04 2014
  • Mathematica
    Select[Prime[Range[200]],PrimeQ[FromDigits[RotateRight[IntegerDigits[#]]]]&] (* Harvey P. Dale, May 05 2022 *)
  • PARI
    rotr(a) = if(a<10, a, eval(Str(a%10, a\10)))
    s=[]; forprime(n=2, 2000, if(isprime(rotr(n)), s=concat(s, n))); s
    

A235689 Semiprimes which remain semiprimes when the leftmost and rightmost digits are removed.

Original entry on oeis.org

141, 142, 143, 145, 146, 161, 166, 169, 194, 247, 249, 262, 265, 267, 291, 295, 298, 299, 341, 346, 361, 362, 365, 391, 393, 394, 395, 398, 445, 446, 447, 466, 469, 493, 497, 542, 543, 545, 562, 565, 566, 591, 597, 649, 662, 667, 669, 694, 695, 697, 698, 699
Offset: 1

Author

Colin Barker, Jan 14 2014

Keywords

Examples

			169 = 13^2 is in the sequence because 6 = 2*3.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100,700],PrimeOmega[#]==PrimeOmega[FromDigits[ Rest[ Most[ IntegerDigits[ #]]]]] ==2&] (* Harvey P. Dale, Nov 22 2018 *)
  • PARI
    list(lim)=my(v=List(), t); forprime(p=2, sqrt(lim), t=p; forprime(q=p, lim\t, listput(v, t*q))); vecsort(Vec(v)) \\ From A001358
    delleft(a) = my(b, c); b=#Str(a); c=a\(10^(b-1)); a-c*(10^(b-1))
    issemiprime(n) = n>0 && bigomega(n)==2
    t=list(700); for(n=1, #t, if(issemiprime(delleft(t[n]\10)), print1(t[n],", ")))

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

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

A258032 Primes p such that p^3 with the rightmost digit removed is also prime.

Original entry on oeis.org

3, 17, 53, 113, 157, 233, 257, 277, 353, 359, 379, 397, 677, 877, 997, 1039, 1217, 1439, 1613, 1697, 1879, 1973, 1997, 2273, 2417, 2459, 2777, 3257, 3413, 3499, 3517, 3697, 3779, 4073, 4157, 4177, 4339, 4973, 4999, 5077, 5197, 5279, 5639, 5813, 5897, 6277, 6379
Offset: 1

Author

K. D. Bajpai, May 16 2015

Keywords

Examples

			a(2) = 17 is prime: 17^3 = 4913. Removing rightmost digit gives 491 which is prime.
a(3) = 53 is prime: 53^3 = 148877. Removing rightmost digit gives 14887 which is prime.
		

Crossrefs

Programs

  • Haskell
    a258032 n = a258032_list !! (n-1)
    a258032_list = filter ((== 1) . a010051' . flip div 10. (^ 3)) a000040_list
    -- Reinhard Zumkeller, May 18 2015
  • Magma
    [p: p in PrimesUpTo(6500) |IsPrime(Floor(p^3/10))]; // Vincenzo Librandi, May 17 2015
    
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[Floor[(#^3)/10]] &]
  • PARI
    forprime(p=1,10000, if(isprime(floor((p^3)/10)), print1(p,", ")))
    

A289190 Numbers k such that k^2 with last digit deleted is a prime.

Original entry on oeis.org

5, 6, 14, 26, 44, 46, 56, 64, 74, 76, 86, 94, 106, 146, 154, 164, 206, 226, 236, 244, 254, 256, 274, 286, 296, 304, 314, 326, 344, 346, 364, 424, 436, 446, 454, 464, 506, 524, 536, 596, 614, 664, 674, 676, 686, 694, 706, 764, 776, 796, 826, 844, 854, 874, 944, 946
Offset: 1

Author

K. D. Bajpai, Jun 27 2017

Keywords

Examples

			14 is in the sequence because 14^2 = 196; deleting the last digit gives 19 which is prime.
26 is in the sequence because 26^2 = 676; deleting the last digit gives 67 which is prime.
		

Programs

  • Magma
    [n : n in [1 .. 2000] | IsPrime (Floor (n^2/10))];
    
  • Maple
    select(n -> isprime(floor(n^2/10)),[$1..2000]);
  • Mathematica
    fQ[n_] := PrimeQ@Quotient[n^2, 10]; Select[Range[1, 2000], fQ]
  • PARI
    isok(n) = isprime(n^2\10); \\ Michel Marcus, Jul 02 2017

A333327 Primes p such that, if p = Sum_{0<=i<=k} d_i*10^i is the decimal expansion, p mod (d_i*10^i) is prime for 0<=i<=k.

Original entry on oeis.org

17, 23, 37, 47, 53, 83, 113, 317, 353, 367, 397, 443, 467, 479, 647, 653, 683, 743, 773, 953, 983, 997, 1223, 1283, 1367, 1373, 1433, 1523, 1823, 1997, 2137, 2467, 2677, 2887, 3167, 3389, 3617, 3727, 3967, 4283, 4349, 4523, 4643, 5197, 5827, 5839, 5857, 6113, 6173, 6317, 6337, 6353, 6653, 6863
Offset: 1

Author

J. M. Bergot and Robert Israel, Mar 15 2020

Keywords

Comments

No digits are 0. Last digit is not 1.

Examples

			a(7) = 113 is a term because 113, 113 mod 100 = 13, 113 mod 10 = 3, and 113 mod 3 = 2 are all prime.
		

Crossrefs

Contained in A227916.

Programs

  • Maple
    filter:= proc(p) local L;
      if not isprime(p) then return false fi;
      L:= convert(p,base,10);
      if has(0,L) then return false fi;
      andmap(i -> isprime(p mod (L[i]*10^(i-1))), [$1..nops(L)])
    end proc:
    select(filter, [seq(i,i=13..10000,2)]);
Showing 1-10 of 10 results.