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

A007652 Final digit of prime(n).

Original entry on oeis.org

2, 3, 5, 7, 1, 3, 7, 9, 3, 9, 1, 7, 1, 3, 7, 3, 9, 1, 7, 1, 3, 9, 3, 9, 7, 1, 3, 7, 9, 3, 7, 1, 7, 9, 9, 1, 7, 3, 7, 3, 9, 1, 1, 3, 7, 9, 1, 3, 7, 9, 3, 9, 1, 1, 7, 3, 9, 1, 7, 1, 3, 3, 7, 1, 3, 7, 1, 7, 7, 9, 3, 9, 7, 3, 9, 3, 9, 7, 1, 9, 9, 1, 1, 3, 9, 3, 9, 7, 1, 3, 7, 9, 7, 1, 9, 3, 9, 1, 3, 1, 7, 7, 3, 9, 1
Offset: 1

Views

Author

Keywords

Comments

Primes modulo 10.

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

Formula

a(n) = A010879(A000040(n)). - Michel Marcus, May 06 2014
Sum_k={1..n} a(k) ~ 5*n. - Amiram Eldar, Dec 11 2024

Extensions

Extended by Ray Chandler, Oct 01 2005

A242119 Primes modulo 18.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 1, 5, 11, 13, 1, 5, 7, 11, 17, 5, 7, 13, 17, 1, 7, 11, 17, 7, 11, 13, 17, 1, 5, 1, 5, 11, 13, 5, 7, 13, 1, 5, 11, 17, 1, 11, 13, 17, 1, 13, 7, 11, 13, 17, 5, 7, 17, 5, 11, 17, 1, 7, 11, 13, 5, 1, 5, 7, 11, 7, 13, 5, 7, 11, 17, 7, 13, 1, 5
Offset: 1

Views

Author

Vincenzo Librandi, May 05 2014

Keywords

Crossrefs

Cf. sequences of the type Primes mod k: A039701 (k=3), A039702 (k=4), A039703 (k=5), A039704 (k=6), A039705 (k=7), A039706 (k=8), A038194 (k=9), A007652 (k=10), A039709 (k=11), A039710 (k=12), A039711 (k=13), A039712 (k=14), A039713 (k=15), A039714 (k=16), A039715 (k=17), this sequence (k=18), A033633 (k=19), A242120(k=20), A242121 (k=21), A242122 (k=22), A229786 (k=23), A229787 (k=24), A242123 (k=25), A242124 (k=26), A242125 (k=27), A242126 (k=28), A242127 (k=29), A095959 (k=30), A110923 (k=100).

Programs

  • Magma
    [p mod(18): p in PrimesUpTo(500)];
    
  • Mathematica
    Mod[Prime[Range[100]], 18]
  • Sage
    [mod(p, 18) for p in primes(500)] # Bruno Berselli, May 05 2014

Formula

Sum_{i=1..n} a(i) ~ 9n. The derivation is the same as in the formula in A039715. - Jerzy R Borysowicz, Apr 27 2022

A137727 Final digit of prime(n)*prime(n+1).

Original entry on oeis.org

6, 5, 5, 7, 3, 1, 3, 7, 7, 9, 7, 7, 3, 1, 1, 7, 9, 7, 7, 3, 7, 7, 7, 3, 7, 3, 1, 3, 7, 1, 7, 7, 3, 1, 9, 7, 1, 1, 1, 7, 9, 1, 3, 1, 3, 9, 3, 1, 3, 7, 7, 9, 1, 7, 1, 7, 9, 7, 7, 3, 9, 1, 7, 3, 1, 7, 7, 9, 3, 7, 7, 3, 1, 7, 7, 7, 3, 7, 9, 1, 9, 1, 3, 7, 7, 7, 3, 7, 3, 1, 3, 3, 7, 9, 7, 7, 9, 3, 3, 7, 9, 1, 7, 9, 7
Offset: 1

Views

Author

Alexander Adamchuk, Feb 08 2008

Keywords

Comments

a(n) is 1, 3, 7, or 9 for n > 3. I conjecture that 1 and 9 appear 17/66 of the time and 3 and 7 appear 8/33 of the time. - Charles R Greathouse IV, Jan 03 2013

Crossrefs

Cf. A006094 (Products of 2 successive primes), A007652 (Final digit of prime(n)), A010879 (final digit of n), A110923 (final two digits of prime(n) (with leading zero omitted)), A137728 (second digit from the end of product of first n primes).

Programs

  • Mathematica
    Table[ Mod[ Prime[n]*Prime[n+1], 10 ], {n,1,1000} ]
    Mod[Times@@@Partition[Prime[Range[110]],2,1],10] (* Harvey P. Dale, Oct 05 2014 *)
  • PARI
    a(n)=prime(n)*prime(n+1)%10 \\ Charles R Greathouse IV, Dec 29 2012
    
  • Python
    from sympy import prime
    def a(n): return (prime(n)*prime(n+1))%10
    print([a(n) for n in range(1, 106)]) # Michael S. Branicky, Jun 05 2021
    
  • Python
    # much faster alternate for initial segment of sequence
    from sympy import nextprime
    def aupton(terms):
        p1, p2, alst = 2, 3, []
        while len(alst) < terms:
            p1, p2, alst = p2, nextprime(p2), alst + [(p1*p2)%10]
        return alst
    print(aupton(105)) # Michael S. Branicky, Jun 05 2021

Formula

a(n) = A010879(A006094(n)). - Felix Fröhlich, Jun 05 2021

A137728 Second digit from the end of product of first n primes.

Original entry on oeis.org

0, 0, 3, 1, 1, 3, 1, 9, 7, 3, 3, 1, 1, 3, 1, 3, 7, 7, 9, 9, 7, 3, 9, 1, 7, 7, 1, 7, 3, 9, 3, 3, 1, 9, 1, 1, 7, 1, 7, 1, 9, 9, 9, 7, 9, 1, 1, 3, 1, 9, 7, 3, 3, 3, 1, 3, 7, 7, 9, 9, 7, 1, 7, 7, 1, 7, 7, 9, 3, 7, 1, 9, 3, 9, 1, 3, 7, 9, 9, 1, 9, 9, 9, 7, 3, 9, 1, 7, 7, 1, 7, 3, 1, 1, 9, 7, 3, 3, 9, 9, 3, 1, 3, 7, 7
Offset: 1

Views

Author

Alexander Adamchuk, Feb 08 2008

Keywords

Comments

a(1) = a(2) = 0 because prime(1) = 2 and prime(1)*prime(2) = 6 are one-digit numbers.

Crossrefs

Cf. A007652 = Final digit of prime(n).
Cf. A110923 = Final two digits of prime(n).
Cf. A137727 = Final digit of prime(n)*prime(n+1).
Cf. A002110 = Primorial numbers, p#.

Programs

  • Maple
    a[1]:= 0: a[2]:= 0: a[3]:= 3: p:= 5:
    for n from 4 to 1000 do
      p:= nextprime(p);
      a[n]:= (a[n-1] * p) mod 10:
    od: # Robert Israel, Nov 22 2018
  • Mathematica
    a(1) = a(2) = 0, for n>2 Table[ Mod[ Product[ Prime[n], {n,1,k} ], 100 ]/10, {k,3,1000} ]

Formula

a(n) = A002110(n)/10 mod 10 for n > 2; a(1) = a(2) = 0.
Showing 1-4 of 4 results.