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.

A343585 a(n) = A081411(n) mod prime(n+1).

Original entry on oeis.org

1, 2, 4, 5, 6, 9, 9, 12, 25, 12, 24, 40, 36, 37, 6, 26, 50, 13, 36, 6, 19, 69, 31, 12, 75, 45, 67, 28, 103, 98, 87, 112, 95, 140, 7, 68, 42, 156, 82, 76, 68, 91, 14, 64, 157, 42, 49, 191, 77, 133, 57, 109, 139, 61, 105, 135, 128, 152, 164, 229, 149, 107, 120, 166, 47, 116, 165, 188, 286, 200, 326
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Apr 20 2021

Keywords

Comments

Do all positive integers appear in the sequence?

Examples

			For n=4, a(4) = (3-2)*(5-3)*(7-5)*(11-7) mod 11 = 5.
		

Crossrefs

Programs

  • Maple
    A081411[1]:= 1:
    for n from 2 to 200 do
      A081411[n]:= A081411[n-1]*(ithprime(n+1)-ithprime(n))
    od:
    seq(A081411[n] mod ithprime(n+1), n=1..200);

A352743 a(n) = Product_{k=1..n} (p(k+1) + p(k))/(p(k+1) - p(k)), where p(k) = prime(k).

Original entry on oeis.org

1, 5, 20, 120, 540, 6480, 48600, 874800, 9185400, 79606800, 2388204000, 27066312000, 527793084000, 22167309528000, 498764464380000, 8312741073000000, 155171166696000000, 9310270001760000000, 198619093370880000000, 6852358721295360000000, 493369827933265920000000
Offset: 0

Views

Author

Thomas Ordowski, Apr 01 2022

Keywords

Comments

Conjecture: a(n) is an integer for every natural n. - Thomas Ordowski
Checked up to n = 10^4. - Amiram Eldar, Mar 30 2022
Checked up to n = 10^6. - Michael S. Branicky, Apr 01 2022
Note that (a(n)-1)/(a(n)+1) is the relativistic sum of the velocities prime(k)/prime(k+1) from k = 1 to n, in units where the speed of light c = 1. - Thomas Ordowski, Apr 05 2022
a(0) = 1, a(n) is the largest k such that b(n+1) = b(n)*(k + a(n-1))/(k - a(n-1)) is prime, where b(1) = 2. By my conjecture, b(n) = prime(n). - Thomas Ordowski, Jul 30 2025

Examples

			a(4) = ((3+2)/(3-2))*((5+3)/(5-3))*((7+5)/(7-5))*((11+7)/(11-7)) = 540.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; (p-> `if`(n=0, 1,
          a(n-1)*(p(n+1)+p(n))/(p(n+1)-p(n))))(ithprime)
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Apr 01 2022
  • Mathematica
    p = Prime[Range[21]]; FoldList[Times, 1, (Rest[p] + Most[p])/(Rest[p] - Most[p])] (* Amiram Eldar, Apr 01 2022 *)
  • PARI
    a(n) = my(v=primes(n+1)); prod(k=1, n, (v[k+1]+v[k])/(v[k+1]-v[k])); \\ Michel Marcus, Apr 10 2025
  • Python
    from sympy import nextprime
    from itertools import islice
    def agen(): # generator of terms
        n, an, p, pp = 0, 1, 2, 3
        while True:
            yield an
            q, r = divmod(an*(pp+p), pp-p)
            assert r == 0, ("Counterexample", n, p, pp)
            n, an, p, pp = n+1, q, pp, nextprime(pp)
    print(list(islice(agen(), 21))) # Michael S. Branicky, Apr 01 2022
    

Formula

a(n) = Product_{k=1..n} A001043(k)/A001223(k).
a(n+1) = 5 * Product_{k=1..n} A024675(k)/A028334(k+1).
Note that A024675(k) and A028334(k+1) are relatively prime.
For n >= 2, a(n) <= (prime(n)+1)*a(n-1). - Thomas Ordowski, Jul 30 2025

Extensions

More terms from Amiram Eldar, Apr 01 2022

A154279 List of pairs (a(n),b(n)): a(n) = prime(n) - prime(n-1) + a(n-1); b(n) = (prime(n) - prime(n-1))*b(n-1).

Original entry on oeis.org

0, 1, 2, 1, 3, 1, 5, 2, 7, 4, 11, 16, 13, 32, 17, 128, 19, 256, 23, 1024, 29, 6144, 31, 12288, 37, 73728, 41, 294912, 43, 589824, 47, 2359296, 53, 14155776, 59, 84934656, 61, 169869312, 67, 1019215872, 71, 4076863488, 73, 8153726976, 79, 48922361856, 83
Offset: 0

Views

Author

Roger L. Bagula, Jan 06 2009

Keywords

Comments

There are primes associated with the product sequence:
Flatten[Table[If[PrimeQ[b[n] - 1], b[n] - 1, If[PrimeQ[b[n] + 1], b[ n] + 1, {}]], {n, 0, 30}]].
{2, 2, 2, 3, 3, 17, 31, 127, 257, 6143, 12289, 73727, 294911, 14155777, 169869311, 4076863487, 1174136684543}

Crossrefs

Cf. A081411.

Programs

  • Mathematica
    a[0] = 0; a[1] = 2; a[n_] := a[n] = Prime[n] - Prime[n - 1] + a[n - 1];
    b[0] = 1; b[1] = 1; b[n_] := b[n] = (Prime[n] - Prime[n - 1])*b[n - 1];
    Flatten[Table[{a[n], b[n]}, {n, 0, 30}]]
  • PARI
    a(n)=if(n<4, return(if(n>2,1,n))); my(k=n\2,p=prime(k-1),q=nextprime(p+1)); if(n%2, (q-p)*a(n-2), q-p + a(n-2)) \\ Charles R Greathouse IV, Sep 09 2016

Formula

{a(n),b(n)}:
a(n) = Prime[n] - Prime[n-1] + a(n-1);
b(n) = ( Prime[n] - Prime[n-1] )*b(n-1).

A070323 Let M_n be the n X n matrix m(i,j) = min(prime(i), prime(j)); then a(n) = det(M_n).

Original entry on oeis.org

2, 2, 4, 8, 32, 64, 256, 512, 2048, 12288, 24576, 147456, 589824, 1179648, 4718592, 28311552, 169869312, 339738624, 2038431744, 8153726976, 16307453952, 97844723712, 391378894848, 2348273369088, 18786186952704, 75144747810816
Offset: 1

Views

Author

Benoit Cloitre, May 11 2002

Keywords

Comments

If A_n is the n X n matrix a(i,j) = Max(prime(i), prime(j)) then det(A_n)/det(M_n) = prime(n)/2.

Crossrefs

Programs

  • Mathematica
    a[n_] := 2*Product[Differences[Prime[Range[100]]][[i]], {i, 1, n - 1}]; Table[a[n], {n, 1, 30}] (* Luca Onnis, Aug 13 2022 *)
  • PARI
    a(n) = matdet(matrix(n, n, i, j, min(prime(i), prime(j)))); \\ Michel Marcus, Aug 13 2022

Formula

a(n) = 2*A037169(n)/prime(n) for n > 1.
a(n) = 2*Product_{i=1..n-1} A001223(i) for n > 1. - Luca Onnis, Aug 13 2022
a(n) = 2 * A081411(n-1) for n >= 2. - Alois P. Heinz, Aug 17 2022
Showing 1-4 of 4 results.