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.

A088136 Primes such that sum of first and last digits is prime.

Original entry on oeis.org

11, 23, 29, 41, 43, 47, 61, 67, 83, 89, 101, 131, 151, 181, 191, 211, 223, 229, 233, 239, 241, 251, 263, 269, 271, 281, 283, 293, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 601, 607, 617, 631, 641, 647, 661, 677, 691
Offset: 1

Views

Author

Zak Seidov, Sep 20 2003

Keywords

Crossrefs

Cf. A008040 (primes), A010051 (isprime), A000030 (first digit of n), A010879 (last digit of n).

Programs

  • Mathematica
    Select[Prime[Range[400]],PrimeQ[First[IntegerDigits[#]]+ Last[ IntegerDigits[ #]]]&] (* Harvey P. Dale, Jun 23 2017 *)
  • PARI
    select( {is_A088136(p)=isprime(p\10^logint(p,10)+p%10)&&isprime(p)}, primes(99)) \\ M. F. Hasler, Apr 23 2024
  • Python
    from sympy import isprime, primerange
    def ok(p): s = str(p); return isprime(int(s[0]) + int(s[-1]))
    def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
    print(aupto(691)) # Michael S. Branicky, Nov 23 2021
    

A088133 Sum of first and last digits of n. Different from A115299.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 8, 9, 10, 11, 12, 13, 14
Offset: 0

Views

Author

Zak Seidov, Sep 20 2003

Keywords

Crossrefs

Cf. A000030 (first digit of n), A010879 (last digit of n).

Programs

  • Mathematica
    Total[{First[IntegerDigits[#]],Last[IntegerDigits[#]]}]&/@Range[90] (* Harvey P. Dale, Aug 21 2018 *)
  • PARI
    apply( {A088133(n)=n\10^logint(n+!n, 10)+n%10}, [0..99]) \\ M. F. Hasler, Apr 22 2024
    
  • Python
    list(map(A088133 := lambda n: int(str(n)[0])+n%10, range(99))) # M. F. Hasler, Apr 22 2024

Formula

a(n) = A000030(n) + A010879(n). - M. F. Hasler, Apr 22 2024

Extensions

Extended to a(0) = 0 by M. F. Hasler, Apr 22 2024

A088134 Numbers n such that sum of first and last digits is prime.

Original entry on oeis.org

1, 11, 12, 14, 16, 20, 21, 23, 25, 29, 30, 32, 34, 38, 41, 43, 47, 49, 50, 52, 56, 58, 61, 65, 67, 70, 74, 76, 83, 85, 89, 92, 94, 98, 101, 102, 104, 106, 111, 112, 114, 116, 121, 122, 124, 126, 131, 132, 134, 136, 141, 142, 144, 146, 151, 152, 154, 156, 161, 162, 164
Offset: 1

Views

Author

Zak Seidov, Sep 20 2003

Keywords

Crossrefs

A108660 Square-loop primes.

Original entry on oeis.org

2, 13, 31, 79, 97, 227, 881, 1013, 2797, 3181, 3631, 8101, 22727, 81001, 101363, 109013, 131363, 181813, 272227, 310181, 310901, 318181, 318881, 631013, 636313, 810401, 818101, 901097, 904097, 972227, 1018813, 1090013, 1810013, 2272727
Offset: 1

Views

Author

Zak Seidov, Jun 16 2005

Keywords

Comments

Primes such that each pair of adjacent digits (and also the first and the last ones) sums up to a square. First term is arguable since there is 'no pair of adjacent digits', but there are the "first" and "last" digits.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[200000]],And@@(IntegerQ[Sqrt[#]]&/@(Total/@Partition[ IntegerDigits[#],2,1,1]))&] (* Harvey P. Dale, Mar 03 2014 *)

A108659 Square-chain primes (including square-loop primes).

Original entry on oeis.org

2, 13, 31, 79, 97, 101, 109, 131, 181, 227, 313, 401, 409, 631, 727, 797, 881, 1009, 1013, 1097, 2797, 3109, 3181, 3631, 4001, 4013, 7901, 8101, 9001, 9013, 10009, 10181, 10909, 10979, 13109, 18131, 18181, 22279, 22727, 27901, 31013, 36313
Offset: 1

Views

Author

Zak Seidov, Jun 16 2005

Keywords

Comments

Primes such that each pair of adjacent digits sums up to a square. First term is a square-loop prime, cf. A108660.

Crossrefs

Programs

  • Mathematica
    Join[{2},Select[Prime[Range[5,4000]],PrimeQ[#]&&AllTrue[Sqrt[#]&/@(Total/@Partition[ IntegerDigits[ #],2,1]),IntegerQ]&]] (* Harvey P. Dale, Jun 02 2024 *)

A086924 Primes such that sum of the first and last digits is a square.

Original entry on oeis.org

2, 13, 31, 79, 97, 103, 113, 163, 173, 193, 227, 257, 277, 311, 331, 613, 643, 653, 673, 683, 709, 719, 739, 769, 811, 821, 881, 907, 937, 947, 967, 977, 997, 1013, 1033, 1063, 1093, 1103, 1123, 1153, 1163, 1193, 1213, 1223
Offset: 1

Views

Author

Zak Seidov, Sep 20 2003

Keywords

Crossrefs

Programs

  • Mathematica
    fldsQ[n_]:=Module[{idn=IntegerDigits[n]},IntegerQ[Sqrt[ idn[[1]] + idn[[-1]]]]]; Select[Prime[Range[200]],fldsQ] (* Harvey P. Dale, Aug 12 2017 *)
  • PARI
    okdigs(n) = digs = digits(n); issquare(digs[1]+digs[#digs]);
    isok(n) = isprime(n) && okdigs(n); \\ Michel Marcus, Oct 05 2013
Showing 1-6 of 6 results.