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

A355430 Primes starting with an even decimal digit.

Original entry on oeis.org

2, 23, 29, 41, 43, 47, 61, 67, 83, 89, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 809, 811, 821
Offset: 1

Views

Author

Bernard Schott, Jul 20 2022

Keywords

Comments

Primes whose reversal is an even integer.

Examples

			43 is a term because 43 is prime and 34 is an even number.
		

Crossrefs

Intersection of A000040 and A273892.
Equals disjoint union of A045708, A045710, A045712 and A045714.
Primes whose reversal is a multiple of k: this sequence (k=2), {3} (k=3), A045711 (k=5), A087762 (k=7), {11} (k=11), A087764 (k=13), A087765 (k=17), A087766 (k=19), A087767 (k=23).

Programs

  • Mathematica
    imax=142; a={}; For[i=1, i<=imax, i++, If[EvenQ[FromDigits[Reverse[IntegerDigits[Prime[i]]]]], AppendTo[a,Prime[i]]]]; a (* Stefano Spezia, Jul 20 2022 *)
    Select[Prime[Range[200]],EvenQ[IntegerDigits[#][[1]]]&] (* Harvey P. Dale, May 18 2025 *)
  • PARI
    isok(k) = isprime(k) && !(fromdigits(Vecrev(digits(k))) % 2); \\ Michel Marcus, Jul 20 2022
    
  • Python
    from sympy import isprime
    def ok(n): return str(n)[0] in "2468" and isprime(n)
    print([k for k in range(822) if ok(k)]) # Michael S. Branicky, Jul 25 2022
    
  • Python
    from sympy import isprime
    from itertools import chain, count, islice, product
    def agen(): yield from chain((2,), (t for t in (b+i for d in count(1) for b in range(2*10**d, 10*10**d, 2*10**d) for i in range(1, 10**d, 2)) if isprime(t)))
    print(list(islice(agen(), 62))) # Michael S. Branicky, Jul 25 2022

A385700 Numbers such that when the leftmost digit is moved to the unit's place the result is divisible by 4.

Original entry on oeis.org

0, 4, 8, 21, 23, 25, 27, 29, 40, 42, 44, 46, 48, 61, 63, 65, 67, 69, 80, 82, 84, 86, 88, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269
Offset: 1

Views

Author

Stefano Spezia, Jul 07 2025

Keywords

Examples

			263 is a term since 632 = 158*4 is divisible by 4.
		

Crossrefs

Similar sequences for k=1..9: A001477, A273892, A008585, this sequence, A217398, A385701, A385702, A385703, A008591.

Programs

  • Mathematica
    Select[Range[0,270],Divisible[FromDigits[RotateLeft[IntegerDigits[#]]],4] &]
  • PARI
    isok(k) = if (k==0, return(1)); my(d=digits(k), v = vector(#d-1, i, d[i+1])); v = concat(v, d[1]); fromdigits(v) % 4 == 0; \\ Michel Marcus, Jul 08 2025
    
  • Python
    def ok(n): return int((s:=str(n))[1:]+s[0])%4 == 0
    print([k for k in range(270) if ok(k)]) # Michael S. Branicky, Jul 08 2025

A385701 Numbers such that when the leftmost digit is moved to the unit's place the result is divisible by 6.

Original entry on oeis.org

0, 6, 21, 24, 27, 42, 45, 48, 60, 63, 66, 69, 81, 84, 87, 201, 204, 207, 210, 213, 216, 219, 222, 225, 228, 231, 234, 237, 240, 243, 246, 249, 252, 255, 258, 261, 264, 267, 270, 273, 276, 279, 282, 285, 288, 291, 294, 297, 402, 405, 408, 411, 414, 417, 420, 423, 426, 429
Offset: 1

Views

Author

Stefano Spezia, Jul 07 2025

Keywords

Examples

			426 is a term since 264 = 44*6 is divisible by 6.
		

Crossrefs

Similar sequences for k=1..9: A001477, A273892, A008585, A385700, A217398, this sequence, A385702, A385703, A008591.

Programs

  • Mathematica
    Select[Range[0,430],Divisible[FromDigits[RotateLeft[IntegerDigits[#]]],6] &]
  • PARI
    isok(k) = if (k==0, return(1)); my(d=digits(k), v = vector(#d-1, i, d[i+1])); v = concat(v, d[1]); fromdigits(v) % 6 == 0; \\ Michel Marcus, Jul 08 2025
    
  • Python
    def ok(n): return int((s:=str(n))[1:]+s[0])%6 == 0
    print([k for k in range(430) if ok(k)]) # Michael S. Branicky, Jul 08 2025

A385702 Numbers such that when the leftmost digit is moved to the unit's place the result is divisible by 7.

Original entry on oeis.org

0, 7, 12, 19, 24, 36, 41, 48, 53, 65, 70, 77, 82, 89, 94, 102, 109, 116, 123, 130, 137, 144, 151, 158, 165, 172, 179, 186, 193, 204, 211, 218, 225, 232, 239, 246, 253, 260, 267, 274, 281, 288, 295, 306, 313, 320, 327, 334, 341, 348, 355, 362, 369, 376, 383, 390, 397
Offset: 1

Views

Author

Stefano Spezia, Jul 07 2025

Keywords

Examples

			376 is a term since 763 = 109*7 is divisible by 7.
		

Crossrefs

Similar sequences for k=1..9: A001477, A273892, A008585, A385700, A217398, A385701, this sequence, A385703, A008591.

Programs

  • Mathematica
    Select[Range[0,400],Divisible[FromDigits[RotateLeft[IntegerDigits[#]]],7] &]
  • PARI
    isok(k) = if (k==0, return(1)); my(d=digits(k), v = vector(#d-1, i, d[i+1])); v = concat(v, d[1]); fromdigits(v) % 7 == 0; \\ Michel Marcus, Jul 08 2025
    
  • Python
    def ok(n): return int((s:=str(n))[1:]+s[0])%7 == 0
    print([k for k in range(400) if ok(k)]) # Michael S. Branicky, Jul 08 2025

A385703 Numbers such that when the leftmost digit is moved to the unit's place the result is divisible by 8.

Original entry on oeis.org

0, 8, 23, 27, 42, 46, 61, 65, 69, 80, 84, 88, 203, 207, 211, 215, 219, 223, 227, 231, 235, 239, 243, 247, 251, 255, 259, 263, 267, 271, 275, 279, 283, 287, 291, 295, 299, 402, 406, 410, 414, 418, 422, 426, 430, 434, 438, 442, 446, 450, 454, 458, 462, 466, 470, 474
Offset: 1

Views

Author

Stefano Spezia, Jul 07 2025

Keywords

Examples

			458 is a term since 584 = 73*8 is divisible by 8.
		

Crossrefs

Similar sequences for k=1..9: A001477, A273892, A008585, A385700, A217398, A385701, A385702, this sequence, A008591.

Programs

  • Mathematica
    Select[Range[0,475],Divisible[FromDigits[RotateLeft[IntegerDigits[#]]],8] &]
  • PARI
    isok(k) = if (k==0, return(1)); my(d=digits(k), v = vector(#d-1, i, d[i+1])); v = concat(v, d[1]); fromdigits(v) % 8 == 0; \\ Michel Marcus, Jul 08 2025
    
  • Python
    def ok(n): return int((s:=str(n))[1:]+s[0])%8 == 0
    print([k for k in range(500) if ok(k)]) # Michael S. Branicky, Jul 08 2025

A345346 Primes whose digit reversal is twice a prime.

Original entry on oeis.org

41, 43, 47, 83, 229, 241, 263, 283, 419, 431, 433, 439, 479, 491, 601, 607, 641, 643, 647, 661, 683, 811, 853, 857, 859, 877, 2039, 2063, 2069, 2083, 2099, 2203, 2207, 2251, 2273, 2281, 2287, 2411, 2417, 2423, 2437, 2467, 2473, 2617, 2621, 2663, 2671, 2677, 2683, 2687, 2689, 2801, 2819, 2837
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jun 14 2021

Keywords

Examples

			a(3) = 47 is a term because 47 and 74/2 = 37 are primes.
		

Crossrefs

Intersection of A085778 and A273892.

Programs

  • Maple
    revdigs:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    filter:= proc(n) isprime(n) and numtheory:-bigomega(revdigs(n))=2 end proc:
    select(filter, [seq(seq(seq(i*10^d+j,j=1..10^d-1,2),i=2..8,2),d=1..4)]);
  • PARI
    isok(p) = if (isprime(p), my(r=fromdigits(Vecrev(digits(p)))); if (!(r%2), isprime(r/2))); \\ Michel Marcus, Jun 15 2021
    
  • Python
    from sympy import isprime, primerange
    def ok(p): t = int(str(p)[::-1]); return t%2 == 0 and isprime(t//2)
    print(list(filter(ok, primerange(1, 2838)))) # Michael S. Branicky, Jun 16 2021
Showing 1-6 of 6 results.