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

A115299 Greatest digit of n + least digit of n. Different from A088133.

Original entry on oeis.org

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: 1

Views

Author

Rick L. Shepherd, Jan 20 2006

Keywords

Comments

a(101) = 1 and A088133(101) = 2, but all previous terms match.

Examples

			a(1) = 1 + 1 = 2, a(232) = 3 + 2 = 5, a(1889009898) = 9 + 0 = 9.
		

Crossrefs

Cf. A037904 (greatest-least), A115300 (greatest*least), A088133 (first+last).

Programs

  • Mathematica
    Array[Max[#] + Min[#] &@ IntegerDigits[#] &, 120] (* Michael De Vlieger, Dec 12 2023 *)
  • Python
    def a(n): d = list(map(int, str(n))); return max(d) + min(d)
    print([a(n) for n in range(1, 87)]) # Michael S. Branicky, Dec 12 2023

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
    

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

A088135 Sum of first and last digits of n-th prime.

Original entry on oeis.org

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

Views

Author

Zak Seidov, Sep 20 2003

Keywords

Crossrefs

Programs

  • Mathematica
    sfl[p_]:=Module[{idn=IntegerDigits[p]},idn[[1]]+idn[[-1]]]; sfl/@Prime[Range[90]] (* Harvey P. Dale, Jan 31 2023 *)

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

A169669 (first digit of n) * (last digit of n) in decimal representation.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 05 2010

Keywords

Comments

a(n) = A000030(n)*A010879(n);
a(n) = A115300(n) for n<=100, A115300(101) = 0;
a(n) = A111707(n) for n<=109, A111707(110) = 1;
0 <= a(n) <= 81, range = A174995;
a(10*n + n mod 10) = a(n);
a(A008592(n)) = 0;
a(n) = a(A004086(n))*A168184(n);

Crossrefs

Programs

  • Haskell
    a169669 n = a000030 n * mod n 10
    -- Reinhard Zumkeller, Apr 29 2015
    
  • Python
    def a(n): return int(str(n)[0])*(n%10)
    print([a(n) for n in range(81)]) # Michael S. Branicky, Jul 13 2022

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