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

A084921 a(n) = lcm(p-1, p+1) where p is the n-th prime.

Original entry on oeis.org

3, 4, 12, 24, 60, 84, 144, 180, 264, 420, 480, 684, 840, 924, 1104, 1404, 1740, 1860, 2244, 2520, 2664, 3120, 3444, 3960, 4704, 5100, 5304, 5724, 5940, 6384, 8064, 8580, 9384, 9660, 11100, 11400, 12324, 13284, 13944, 14964, 16020, 16380
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 11 2003

Keywords

Comments

This sequence consists of terms of sequences A055523 and A055527 for prime n > 2. - Toni Lassila (tlassila(AT)cc.hut.fi), Feb 02 2004

Crossrefs

Programs

  • Haskell
    a084921 n = lcm (p - 1) (p + 1)  where p = a000040 n
    -- Reinhard Zumkeller, Jun 01 2013
    
  • Magma
    [3] cat [(p^2-1)/2: p in PrimesInInterval(3,300)]; // G. C. Greubel, May 03 2024
    
  • Mathematica
    LCM[#-1,#+1]&/@Prime[Range[50]] (* Harvey P. Dale, Oct 09 2018 *)
  • PARI
    a(n)=if(n<2,3,(prime(n)^2-1)/2) \\ Charles R Greathouse IV, May 15 2013
    
  • SageMath
    [3]+[(n^2-1)/2 for n in prime_range(3,301)] # G. C. Greubel, May 03 2024

Formula

a(n) = A084920(n)/2 for n > 1.
a(n) = 3*A084922(n) for n > 2.
a(n) = A009286(A000040(n)). - Enrique Pérez Herrero, May 17 2012
a(n) ~ 0.5 n^2 log^2 n. - Charles R Greathouse IV, May 15 2013
Product_{n>=1} (1 + 1/a(n)) = 2. - Amiram Eldar, Jan 23 2021
a(n) = (A000040(n)^2 - 1) / 2 for n > 1. - Christian Krause, Mar 27 2021
a(n) = (3/2)*A024700(n-2), for n > 1. - G. C. Greubel, May 03 2024

A138694 Numbers n such that the set {2*n+p^2, p any prime} contains exactly one prime.

Original entry on oeis.org

1, 4, 7, 10, 16, 19, 22, 25, 31, 37, 40, 46, 49, 52, 61, 64, 70, 79, 82, 85, 91, 94, 109, 112, 115, 121, 124, 127, 130, 136, 142, 151, 154, 169, 172, 175, 187, 190, 196, 205, 211, 217, 220, 226, 229, 235, 241, 247, 250, 256, 274, 277, 280, 289, 292, 295, 304, 316
Offset: 1

Views

Author

Artur Jasinski, Mar 27 2008

Keywords

Comments

The sequence forms a subset of A016777, as explained below:
For each prime p<>3 we have p^2 =1 (mod 3), see A024700.
(i) For the k where 2*k=2 (mod 3), that is where k=1 (mod 3), this leads to 2*k+p^2=0 (mod 3), so the 2*k+p^2 are divisible by 3 (not prime) unless p=3.
The subcase where 2*k+3^2 is prime generates this sequence here; the subcase where it is not generates A138685.
(ii) For the k where 2*k=0 (mod 3), that is where k=0 (mod 3), one can select any p^2 =1 (mod 3)
to generate a prime 2*k+p^2 = 1 (mod 3), so these k generate many primes (of the form A002476).
(iii) For the k where 2*k=1 (mod 3), that is where k=2 (mod 3), one can select any p^2 =1 (mod 3)
to generate a prime 2*k+p^2 = 2 (mod 3), so these k generate many primes (of the form A003627).
The unique primes associated with each n are in A007528: n=1 associated with A007528(2)=11=2*1+3^2,
n=4 associated with A007528(3)=17=2*4+3^2 etc.

Examples

			3 is not in the sequence because {6+2^2, 6+3^3, 6+5^2, 6+7^2,..} = {10, 15, 31, 55,..,127,..,367,..}
contains the primes 31, 127, 367,..., generated with p=5,11,19...
4 is in the sequence because {8+2^2, 8+3^3, 8+5^2, 8+7^2,..} = {12, 17, 33, 57,...} contains
only one prime (that is, 17), generated with p=3.
		

Crossrefs

Programs

  • Mathematica
    b = {}; Do[a = {}; Do[If[PrimeQ[2*k + Prime[n]^2], AppendTo[a, k]], {n, 1, 100}]; If[Length[a] < 2, AppendTo[b, a]], {k, 1, 500}]; Union[Flatten[b]]

Formula

{This sequence here} Union {A138685} = {A016777}.

Extensions

Edited by R. J. Mathar, May 15 2009

A061066 a(n) = (prime(n)^2 - 1)/8.

Original entry on oeis.org

1, 3, 6, 15, 21, 36, 45, 66, 105, 120, 171, 210, 231, 276, 351, 435, 465, 561, 630, 666, 780, 861, 990, 1176, 1275, 1326, 1431, 1485, 1596, 2016, 2145, 2346, 2415, 2775, 2850, 3081, 3321, 3486, 3741, 4005, 4095, 4560, 4656, 4851, 4950, 5565, 6216, 6441
Offset: 2

Views

Author

Labos Elemer, May 28 2001

Keywords

Comments

This sequence is a subsequence of the triangular numbers (A000217) because (prime(n)^2-1)/8 = ((2m+1)^2-1)/8 = m(m+1)/2 where p=2m+1 for a given m. - David Morales Marciel, Oct 07 2015
The Jacobi symbol (2|p) = (-1)^((p^2-1)/8). - Michael Somos, Feb 17 2020
Number of inversions of the permutation ((2*i) mod p){1<=i<=p-1} = (2,4,...,p-1,1,3,...,p-2) of {1,2,...,p-1}, where p = prime(n). - _Jianing Song, Apr 07 2023

Examples

			a(2) = 1 because p = prime(2) = 3 and (3^2-1)/8 = 1. - _Michael Somos_, Feb 17 2020
		

References

  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 307.

Crossrefs

Programs

Formula

a(n) = A000217(A005097(n-1)). - after first comment, Michel Marcus, Oct 07 2015
a(n) = (3/8)*A024700(n-2). - G. C. Greubel, May 03 2024
Showing 1-3 of 3 results.