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 59 results. Next

A301378 a(n) = 10*A007605(n) - 9*A007652(n).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 11, 13, 17, 19, 23, 37, 41, 47, 49, 59, 61, 67, 73, 77, 83, 89, 91, 101, 103, 107, 109, 31, 43, 47, 49, 53, 59, 61, 71, 77, 83, 89, 91, 97, 101, 103, 113, 37, 41, 43, 47, 61
Offset: 1

Views

Author

Edmund Algeo, Mar 19 2018

Keywords

Comments

Equivalently, a(n) is the sum of all but the last digit of the n-th prime, concatenated with that last digit.
It appears that as the prime number xyzd transformed by (x+y+z)*10 +d; the larger the prime the less frequent the result is prime....

Examples

			For p=1571 (prime), 1+5+7 = 13; 13*10 = 130; 130+1 = 131 (prime).
		

Crossrefs

Programs

  • Maple
    map(t -> 10*convert(convert(t,base,10),`+`)-9*(t mod 10), [seq(ithprime(i),i=1..100)]); # Robert Israel, Mar 25 2018
  • Mathematica
    Array[10 Total@ # - 9 Last@ # &@ IntegerDigits[Prime@ #] &, 67] (* Michael De Vlieger, Apr 27 2018 *)
  • PARI
    a(n) = my(p=prime(n); d=p % 10); sumdigits(p-d)*10+d; \\ Michel Marcus, Mar 23 2018

Formula

Let ...xyzd represent the decimal expansion of prime(n); then a(n) = (... + x + y + z)*10 + d.
a(n) = 10*A007605(n) - 9*A007652(n). - Robert Israel, Mar 25 2018

A039701 a(n) = n-th prime modulo 3.

Original entry on oeis.org

2, 0, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 2, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1
Offset: 1

Views

Author

Keywords

Comments

If n > 2 and prime(n) is a Mersenne prime then a(n) = 1. Proof: prime(n) = 2^p - 1 for some odd prime p, so prime(n) = 2*4^((p-1)/2) - 1 == 2 - 1 = 1 (mod 3). - Santi Spadaro, May 03 2002; corrected and simplified by Dean Hickerson, Apr 20 2003
Except for n = 2, a(n) is the smallest number k > 0 such that 3 divides prime(n)^k - 1. - T. D. Noe, Apr 17 2003
a(n) <> 0 for n <> 2; a(A049084(A003627(n))) = 2; a(A049084(A002476(n))) = 1; A134323(n) = (1 - 0^a(n)) * (-1)^(a(n)+1). - Reinhard Zumkeller, Oct 21 2007
Probability of finding 1 (or 2) in this sequence is 1/2. This follows from the Prime Number Theorem in arithmetic progressions. Examples: There are 4995 1's in terms (10^9 +1) to (10^9+10^4); there are 10^9/2-1926 1's in the first 10^9 terms. - Jerzy R Borysowicz, Mar 06 2022

Crossrefs

Cf. A091178 (indices of 1's), A091177 (indices of 2's).
Cf. A120326 (partial sums).
Cf. A010872.

Programs

Formula

Sum_k={1..n} a(k) ~ (3/2)*n. - Amiram Eldar, Dec 11 2024

A039702 a(n) = n-th prime modulo 4.

Original entry on oeis.org

2, 3, 1, 3, 3, 1, 1, 3, 3, 1, 3, 1, 1, 3, 3, 1, 3, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 3, 1, 1, 3, 3, 1, 3, 1, 3, 1, 3, 3, 1, 3, 1, 3, 1, 1, 3, 3, 3, 3, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 3, 1, 3, 3, 1, 1, 3, 1, 3, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 1, 3, 1, 3, 1, 3, 3, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 1, 1, 3, 1, 3, 1, 3, 1, 3
Offset: 1

Views

Author

Keywords

Comments

Except for the first term, A100672(n) = (a(n)-1)/2 = parity of A005097. - Jeremy Gardiner, May 17 2008

Crossrefs

Programs

Formula

Sum_k={1..n} a(k) ~ 2*n. - Amiram Eldar, Dec 11 2024

A039706 a(n) = n-th prime modulo 8.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

Formula

Sum_k={1..n} a(k) ~ 4*n. - Amiram Eldar, Dec 11 2024

A039703 a(n) = n-th prime modulo 5.

Original entry on oeis.org

2, 3, 0, 2, 1, 3, 2, 4, 3, 4, 1, 2, 1, 3, 2, 3, 4, 1, 2, 1, 3, 4, 3, 4, 2, 1, 3, 2, 4, 3, 2, 1, 2, 4, 4, 1, 2, 3, 2, 3, 4, 1, 1, 3, 2, 4, 1, 3, 2, 4, 3, 4, 1, 1, 2, 3, 4, 1, 2, 1, 3, 3, 2, 1, 3, 2, 1, 2, 2, 4, 3, 4, 2, 3, 4, 3, 4, 2, 1, 4, 4, 1, 1, 3, 4, 3, 4, 2, 1, 3, 2, 4, 2, 1, 4, 3, 4, 1, 3, 1, 2, 2, 3, 4, 1
Offset: 1

Views

Author

Keywords

Comments

a(A049084(A045356(n-1))) = even; a(A049084(A045429(n-1))) = odd. - Reinhard Zumkeller, Feb 25 2008

Crossrefs

Programs

Formula

Sum_k={1..n} a(k) ~ (5/2)*n. - Amiram Eldar, Dec 11 2024

A039715 Primes modulo 17.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

Formula

By the Prime Number Theorem in Arithmetic Progressions, all nonzero residue classes are equiprobable. In particular, Sum_{k=1..n} a(k) ~ 8.5n. - Charles R Greathouse IV, Apr 16 2012

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

A039704 a(n) = n-th prime modulo 6.

Original entry on oeis.org

2, 3, 5, 1, 5, 1, 5, 1, 5, 5, 1, 1, 5, 1, 5, 5, 5, 1, 1, 5, 1, 1, 5, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 1, 5, 1, 1, 1, 5, 5, 5, 1, 5, 1, 5, 1, 1, 1, 5, 1, 5, 5, 1, 5, 5, 5, 5, 1, 1, 5, 1, 5, 1, 5, 1, 5, 1, 1, 5, 1, 5, 5, 1, 1, 1, 5, 5, 1, 5, 1, 5, 1, 5, 1, 1, 5, 5, 1, 5, 1, 5, 5, 1, 5, 1, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

Sum_k={1..n} a(k) ~ 3*n. - Amiram Eldar, Dec 11 2024

A039705 a(n) = n-th prime modulo 7.

Original entry on oeis.org

2, 3, 5, 0, 4, 6, 3, 5, 2, 1, 3, 2, 6, 1, 5, 4, 3, 5, 4, 1, 3, 2, 6, 5, 6, 3, 5, 2, 4, 1, 1, 5, 4, 6, 2, 4, 3, 2, 6, 5, 4, 6, 2, 4, 1, 3, 1, 6, 3, 5, 2, 1, 3, 6, 5, 4, 3, 5, 4, 1, 3, 6, 6, 3, 5, 2, 2, 1, 4, 6, 3, 2, 3, 2, 1, 5, 4, 5, 2, 3, 6, 1, 4, 6, 5, 2, 1, 2, 6, 1, 5, 3, 4, 1, 2, 6, 5, 3, 5, 2, 1, 4, 3, 2, 4
Offset: 1

Views

Author

Keywords

Comments

a(A049084(A045370(n-1))) is even; a(A049084(A045415(n-1))) is odd. - Reinhard Zumkeller, Feb 25 2008

Crossrefs

Programs

Formula

Sum_k={1..n} a(k) ~ (7/2)*n. - Amiram Eldar, Dec 11 2024

A138840 Concatenation of initial and final digits of n-th prime.

Original entry on oeis.org

22, 33, 55, 77, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 11, 13, 17, 19, 13, 17, 11, 17, 19, 19, 11, 17, 13, 17, 13, 19, 11, 11, 13, 17, 19, 21, 23, 27, 29, 23, 29, 21, 21, 27, 23, 29, 21, 27, 21, 23, 23, 37, 31, 33, 37, 31, 37, 37
Offset: 1

Views

Author

Omar E. Pol, Apr 01 2008

Keywords

Comments

There are only 38 distinct terms in this sequence, all of them odd with the exception of 22. 55 is the only term divisible by 5. 22 and 55 each appear only once. The other terms, each of which appears multiple times, are the odd two-digit numbers not divisible by 5. - Harvey P. Dale, May 15 2012
a(n) is the concatenation of A077648(n) and A007652(n), hence all terms of this sequence have two digits in the same way as A073729. - Omar E. Pol, Mar 23 2018

Crossrefs

Cf. A137589 (same except for first four terms).

Programs

  • Maple
    a:= n-> (p-> parse(cat(p[1], p[-1])))(""||(ithprime(n))):
    seq(a(n), n=1..92);  # Alois P. Heinz, Nov 23 2023
  • Mathematica
    cifd[n_]:=Module[{il=IntegerLength[n],idn=IntegerDigits[n]},Which[ il==1, 10n+n, il==2,n,il>2,FromDigits[Join[{First[idn],Last[idn]}]]]]; cifd/@ Prime[ Range[70]] (* Harvey P. Dale, May 15 2012 *)
  • PARI
    a(n) = my(d=digits(prime(n))); fromdigits(concat(d[1], d[#d])); \\ Michel Marcus, Mar 23 2018
Showing 1-10 of 59 results. Next