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

A136370 Numerator of 1 - Sum_{k=1..n} (-1)^(k+1)/prime(k)^2.

Original entry on oeis.org

3, 31, 739, 37111, 4446331, 756766039, 217803584371, 78887714418031, 41637516941042299, 35066922176061410359, 33657455280704707522099, 46117280789485930425170431, 77468081652660425646977758411, 143331051198625503752852285686039
Offset: 1

Views

Author

Alexander Adamchuk, Dec 27 2007

Keywords

Comments

It seems that the denominator of 1 - Sum_{k=1..n} (-1)^(k+1)/prime(k)^2 is A061742(n), which is the square of the product of the first n primes, but this is not immediately obvious. - Petros Hadjicostas, May 14 2020

Examples

			The first few fractions are 3/4, 31/36, 739/900, 37111/44100, 4446331/5336100, 756766039/901800900, ... = A136370/A061742. - _Petros Hadjicostas_, May 14 2020
		

Crossrefs

Possible denominators are A061742.

Programs

  • Mathematica
    Table[Numerator[1 - Sum[(-1)^(k+1)/Prime[k]^2, {k, 1, n}]], {n, 1, 20}]
  • PARI
    a(n) = numerator(1 - sum(k=1, n, (-1)^(k+1)/prime(k)^2)); \\ Michel Marcus, May 14 2020
    
  • Python
    from sympy import prime
    from fractions import Fraction
    from itertools import accumulate, count, islice
    def A136370gen(): yield from map(lambda x: (1-x).numerator, accumulate(Fraction((-1)**(k+1), prime(k)**2) for k in count(1)))
    print(list(islice(A136370gen(), 14))) # Michael S. Branicky, Jun 26 2022

Formula

A136370/A061742 tends to 1 - A242301 = 0.83718375333639858423166... - Vaclav Kotesovec, May 14 2020

Extensions

Definition corrected by Alexander Adamchuk, Sep 15 2010
a(14) and beyond from Michael S. Branicky, Jun 26 2022

A136365 Numbers k such that A075986(k) is prime.

Original entry on oeis.org

1, 171, 210, 550, 1445, 1809, 2176, 2719
Offset: 1

Views

Author

Alexander Adamchuk, Dec 27 2007

Keywords

Crossrefs

Cf. A075986 (numerator of 1 + 1/p(1)^2 + ... + 1/p(n)^2, where p(k) = prime(k)).

Programs

  • Mathematica
    f=1; Do[ p=Prime[n]; f=f + 1/p^2; g=Numerator[ f ]; If[ PrimeQ[ g ], Print[ {n, g} ] ], {n, 1, 210} ]

Extensions

a(4)-a(8) from Robert Price, Aug 26 2019

A136366 Numbers k such that A024530(k) is prime.

Original entry on oeis.org

3, 4, 5, 10, 21, 31, 55, 77, 121, 135, 148, 192, 425, 570, 612, 649, 1293, 2326, 3646
Offset: 1

Views

Author

Alexander Adamchuk, Dec 27 2007

Keywords

Crossrefs

Cf. A024530 (numerator of Sum_{k=1..n} (-1)^k / prime(k)).

Programs

  • Mathematica
    f=0; Do[ p=Prime[n]; f=f + (-1)^(n+1)*1/p; g=Numerator[f] ;If[ PrimeQ[g], Print[ {n, g} ] ], {n, 1, 150} ]

Extensions

a(12)-a(16) from Alexander Adamchuk, Sep 15 2010
a(17)-a(19) from Robert Price, Aug 27 2019

A136368 Numerator of Sum_{k=1..n} (-1)^(k+1)/prime(k)^2.

Original entry on oeis.org

1, 5, 161, 6989, 889769, 145034861, 42816875729, 15196271678069, 8132911703794601, 6790008314246422541, 6567054920481119894801, 8950073675937467308565669, 15100141203716305943432625689
Offset: 1

Views

Author

Alexander Adamchuk, Dec 27 2007

Keywords

Crossrefs

Programs

  • Magma
    [Numerator(&+[(-1)^(k+1)/NthPrime(k)^2:k in [1..n]]): n in [1..13]]; // Marius A. Burtea, Aug 26 2019
  • Mathematica
    Table[Numerator[Sum[(-1)^(k+1)/Prime[k]^2, {k, 1, n}]], {n, 1, 20}]

A136371 Numbers k such that A136370(k) is prime.

Original entry on oeis.org

1, 2, 3, 5, 46, 227, 232, 336, 360, 3919
Offset: 1

Views

Author

Alexander Adamchuk, Dec 27 2007

Keywords

Crossrefs

Cf. A024530: numerator of Sum_{k=1..n} (-1)^k/prime(k).
Cf. A136368: numerator of Sum_{k=1..n} (-1)^(k+1)/prime(k)^2.
Cf. A136370: numerator of 1 - Sum_{k=1..n} (-1)^(k+1)/prime(k)^2.

Programs

  • Mathematica
    f=1; Do[ p=Prime[n]; f=f - (-1)^(n+1)*1/p^2; g=Numerator[f] ;If[ PrimeQ[g], Print[ {n, g} ] ], {n, 1, 100} ]
  • Python
    # uses A136370gen() and imports from A136370
    from sympy import isprime
    def agen(): yield from (k for k, ak in enumerate(A136370gen(), 1) if isprime(ak))
    print(list(islice(agen(), 5))) # Michael S. Branicky, Jun 26 2022

Extensions

More terms added and edited by Alexander Adamchuk, Sep 15 2010
a(10) from Robert Price, Aug 29 2019

A136367 Numbers k such that A024529(k+1) is prime.

Original entry on oeis.org

2, 3, 4, 5, 11, 59, 397, 613, 906, 1560, 2162, 2915, 5211
Offset: 1

Views

Author

Alexander Adamchuk, Dec 27 2007

Keywords

Comments

A024529(n+1) = numerator of 1 + Sum_{j=1..n} (-1)^j/prime(j): 1, 5, 19, 163, 1583, 22889, 359083, 7333087, 158961311, 4832970889, 143352404329, ...

Crossrefs

Cf. A024529: numerator of 1 + Sum_{k=1..n-1} (-1)^k/prime(k).

Programs

  • Mathematica
    f=1; Do[ p=Prime[n]; f=f + (-1)^n*1/p; g=Numerator[f] ;If[ PrimeQ[g], Print[ {n, g} ] ], {n, 1, 60} ]

Extensions

a(7)-a(9) from Alexander Adamchuk, Sep 15 2010
a(10) from Vincenzo Librandi, Aug 26 2019
a(11)-a(13) from Robert Price, Aug 29 2019
Showing 1-6 of 6 results.