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.

Previous Showing 11-20 of 33 results. Next

A330718 a(n) = numerator(Sum_{k=1..n} (2^k-2)/k).

Original entry on oeis.org

0, 1, 3, 13, 25, 137, 245, 871, 517, 4629, 8349, 45517, 83317, 1074679, 1992127, 7424789, 13901189, 78403447, 147940327, 280060651, 531718651, 11133725681, 21243819521, 40621501691, 15565330735, 388375065019, 248882304985, 479199924517, 923951191477, 2973006070891
Offset: 1

Views

Author

Amiram Eldar and Thomas Ordowski, Dec 28 2019

Keywords

Comments

If p > 3 is prime, then p^2 | a(p).
Note the similarity to Wolstenholme's theorem.
Conjecture: for n > 3, if n^2 | a(n), then n is prime.
Are there the weak pseudoprimes m such that m | a(m)?
Primes p such that p^3 | a(p) are probably A088164.
If p is an odd prime, then a(p+1) == A330719(p+1) (mod p).
If p > 3 is a prime, then p^2 | numerator(Sum_{k=1..p+1} F(k)), where F(n) = Sum_{k=1..n} (2^(k-1)-1)/k. Cf. A027612 (a weaker divisibility).

Examples

			Numerators of 0, 1, 3, 13/2, 25/2, 137/6, 245/6, ...
		

Crossrefs

Programs

  • Magma
    [Numerator( &+[(2^k -2)/k: k in [1..n]] ): n in [1..30]]; // G. C. Greubel, Dec 28 2019
    
  • Maple
    seq(numer(add((2^k -2)/k, k = 1..n)), n = 1..30); # G. C. Greubel, Dec 28 2019
  • Mathematica
    Numerator @ Accumulate @ Array[(2^# - 2)/# &, 30]
    Table[Numerator[Simplify[-(2^(n+1)*LerchPhi[2,1,n+1] +Pi*I +2*HarmonicNumber[n])]], {n,30}] (* G. C. Greubel, Dec 28 2019 *)
  • PARI
    a(n) = numerator(sum(k=1, n, (2^k-2)/k)); \\ Michel Marcus, Dec 28 2019
    
  • Sage
    [numerator( sum((2^k -2)/k for k in (1..n)) ) for n in (1..30)] # G. C. Greubel, Dec 28 2019

Formula

a(n) = numerator(Sum_{k=1..n} (2^(k-1)-1)/k).
a(n+1) = numerator(a(n)/A330719(n) + A225101(n+1)/(2*A159353(n+1))).
a(p) = a(p-1) + A007663(n)*A330719(p-1) for p = prime(n) > 2.
a(n) = numerator(-(2^(n+1)*LerchPhi(2,1,n+1) + Pi*i + 2*HarmonicNumber(n))). - G. C. Greubel, Dec 28 2019
a(n) = numerator(A279683(n)/n!) for n > 0. - Amiram Eldar and Thomas Ordowski, Jan 15 2020
For n > 1, a(n) = A000265(A290347(n)). - Thomas Ordowski, Mar 29 2025

A355959 Primes p such that (p+2)^(p-1) == 1 (mod p^2).

Original entry on oeis.org

5, 45827
Offset: 1

Views

Author

Felix Fröhlich, Jul 21 2022

Keywords

Comments

a(3) > 107659373057 if it exists.
Primes p such that the Fermat quotient of p base 2 (A007663) is congruent to 1/2 modulo p. - Max Alekseyev, Aug 27 2023

Crossrefs

(p+k)^(p-1) == 1 (mod p^2): A355960 (k=5), A355961 (k=6), A355962 (k=7), A355963 (k=8), A355964 (k=9), A355965 (k=10).
Cf. A007663.

Programs

  • PARI
    forprime(p=1, , if(Mod(p+2, p^2)^(p-1)==1, print1(p, ", ")))

A146211 Fermat quotient of the n-th prime with base 3.

Original entry on oeis.org

16, 104, 5368, 40880, 2532160, 20390552, 1364393896, 788854912240, 6641649422408, 4056611764783760, 296528425830656800, 2544627654221217656, 188573151481968108424, 121907205457107043376080
Offset: 3

Views

Author

R. J. Mathar, Oct 28 2008

Keywords

Crossrefs

Subsequence of A046211. Cf. A007663.

Programs

  • Maple
    A146211:= n-> map (p-> (3^(p-1)-1)/p, ithprime(n)):
    seq (A146211(n), n=3..16); # Jani Melik, Jan 24 2010
  • Mathematica
    Table[(3^(p - 1) - 1)/p, {p, Prime[Range[3, 16]]}] (* Amiram Eldar, Oct 13 2023 *)
  • PARI
    a(n) = my(p=prime(n)); (3^(p-1)-1)/p; \\ Michel Marcus, Oct 13 2023

Formula

a(n) = (3^(p-1)-1)/p, where p=A000040(n).
a(n) = A046211(A000040(n)), for n >= 3. - Amiram Eldar, Oct 13 2023

A239502 (Round(q^prime(n)) - 1)/prime(n), where q is the tribonacci constant (A058265).

Original entry on oeis.org

4, 10, 74, 212, 1856, 5618, 53114, 1630932, 5161442, 167427844, 1729192432, 5577731626, 58401766802, 2005139696964, 69737304018266, 228184540445268, 8043367476888770, 86866463049858250, 285815985033409648, 10225367934387562098, 111384745483589787826
Offset: 3

Views

Author

Keywords

Comments

For n>=3, round(q^prime(n)) == 1 (mod 2*prime(n)). Proof in Shevelev link. In particular, all terms are even.

Examples

			For n=3, q^5 = 21.049..., so a(3) = (21 - 1)/5 = 4.
		

Crossrefs

A180511 Fermat quotients for base 4: (4^(p - 1) - 1)/p, where p = prime(n).

Original entry on oeis.org

5, 51, 585, 95325, 1290555, 252645135, 3616814565, 764877654105, 2484744621997515, 37191016277640225, 127631526564044465235, 29485995600356809139175, 449832863112420158030205
Offset: 2

Views

Author

Jani Melik, Jan 20 2011

Keywords

Crossrefs

Programs

  • Maple
    A180511:= n-> map (p-> (4^(p-1)-1)/p, ithprime(n)):
    seq (A180511(n), n=2..20);  # Peter Luschny, Jan 21 2010
  • Mathematica
    Table[(4^(Prime[n] - 1) - 1)/Prime[n], {n, 2, 20}] (* Alonso del Arte, Jan 20 2011 *)

A238490 Odd primes p that divide a Lucas quotient studied by H. C. Williams: A001353(p - (3/p))/p, where (3/p) is a Jacobi symbol.

Original entry on oeis.org

103, 2297860813
Offset: 1

Views

Author

John Blythe Dobson, Mar 28 2014

Keywords

Comments

The condition for an odd prime p to be a member of this sequence is that p^2 divides A001353(p - (3/p)).
Neither this quotient, nor the Lucas sequence U(4, 1) on which it is based, has a common name; but its fundamental discriminant of 3 places it between the quotient based on the Pell sequence U(2, -1) with discriminant 2 (A000129), and that based on the Fibonacci sequence U(1, -1) with discriminant 5 (A000045). Values of p dividing the Pell quotient will be found under A238736, while for the Fibonacci quotient it is known that there is no such p < 9.7*10^14.
The interest in this family of number-theoretic quotients derives from H. C. Williams, "Some formulas concerning the fundamental unit of a real quadratic field," p. 440, which proves a formula connecting the present quotient with the Fermat quotient base 2 (A007663), the Fermat quotient base 3 (A146211), and the harmonic number H(floor(p/12)) (see the Formula section below). As is well known, the vanishing of each of these Fermat quotients is a necessary condition for the failure of the first case of Fermat's Last Theorem (see discussions under A001220 and A014127); and a corresponding result concerning this type of harmonic number was proved by Dilcher and Skula. Thus, the vanishing mod p of the quotient based on U(4, 1) is also a necessary condition for the failure of the first case of Fermat's Last Theorem.
The pioneering computation for this quotient appears to be that of Elsenhans and Jahnel, "The Fibonacci sequence modulo p^2," p. 5, who report 103 as the only value of a(n) < 10^9. Extending the search to p < 2.5*10^10 has found only one further solution, 2297860813.
Let LucasQuotient(p) = A001353(p - (3/p))/p, q_2 = (2^(p-1) - 1)/p = A007663(p) be the corresponding Fermat quotient of base 2, q_3 = (3^(p-1) - 1)/p = A146211(p) be the corresponding Fermat quotient of base 3, H(floor(p/12)) be a harmonic number. Then Williams (1991) shows that 6*(3/p)*LucasQuotient(p) == -6*q_2 - 3*q_3 - 2*H(floor(p/12)) (mod p).
Also with an initial 2, primes p such that p^2 divides A001353(p - Kronecker(12,p)) (note that 12 is the discriminant of the characteristic polynomial of A001353, x^2 - 4x + 1). - Jianing Song, Jul 28 2018

Examples

			LucasQuotient(103) = 103*851367555454046677501642274766916900879231854719584128208.
		

Crossrefs

Programs

  • Mathematica
    The following criteria are equivalent:
    PrimeQ[p] &&
      Mod[(MatrixPower[{{1,2},{1,3}}, p-JacobiSymbol[3,p]-1].{{1},{1}})[[2,1]], p^2]==0
    PrimeQ[p] && Mod[Last[LinearRecurrence[{4,-1},{0,1}, p-JacobiSymbol[3,p]+1]], p^2]==0
  • PARI
    isprime(p) && (Mod([2, 2; 1, 0], p^2)^(p-kronecker(3, p)))[2, 1]==0 \\ This test, which was used to find the second member of this sequence, is based on the test for A238736 devised by Charles R Greathouse IV

A239544 (Round(c^prime(n)) - 1)/prime(n), where c is the tetranacci constant (A086088).

Original entry on oeis.org

14, 124, 390, 4118, 13690, 156122, 6351030, 22074820, 948652694, 11818395344, 41868809842, 528803858638, 24052859078262, 1108257471317098, 3982717894786008, 185987895674303758, 2422894681885464596, 8755616404517667662, 414985190213435939298
Offset: 4

Views

Author

Keywords

Comments

For n>=4, round(c^prime(n)) == 1 (mod 2*prime(n)). Proof in Shevelev link. In particular, all terms are even.

Crossrefs

A222207 Morley quotients: (2^(2*p-2) - (-1)^((p-1)/2)*binomial(p-1,(p-1)/2)) / p^3, where p = prime(n) and n >= 3.

Original entry on oeis.org

2, 12, 788, 7636, 874202, 10018884, 1445893544, 2954512034024, 38700329118256, 93229749133527532, 17540746936557672236, 243284404062970619608, 47694250379410432495952, 136236017676683906365850456, 404504597532158799519693872144, 5856120097210409121404621878992, 18102352585707069737371994385420772, 3894254646848417473467131712404310728
Offset: 3

Views

Author

Jonathan Sondow, Feb 22 2013

Keywords

Comments

Morley (1894/95) proved 2^(2*p-2) == (-1)^((p-1)/2)*binomial(p-1,(p-1)/2) mod p^3 for all primes p > 3.
Morley quotients are even, since 2^(2*p-2) and binomial(p-1,(p-1)/2) are even and p^3 is odd.

Examples

			prime(3) = 5, so a(3) = (2^(2*5-2) - (-1)^((5-1)/2)*binomial(5-1,(5-1)/2))/5^3 = (2^8 - binomial(4,2))/5^3 = (256-6)/125 = 2.
		

Crossrefs

Programs

  • Mathematica
    m[p_] := (2^(2*p-2) - (-1)^((p-1)/2)*Binomial[p-1, (p-1)/2])/p^3; Table[ m[ Prime[n]], {n, 3, 20}]

A239564 a(n) = (round(c^prime(n)) - 1)/prime(n), where c is the pentanacci constant (A103814).

Original entry on oeis.org

154, 504, 5758, 19912, 245714, 11251030, 40679232, 1967728552, 26525975822, 97753187576, 1335948880418, 68398141417510, 3547322151373882, 13260715720748120, 697034813138756392, 9825603574709578482, 36935066391752894480, 1970457739485406707872
Offset: 5

Views

Author

Keywords

Comments

For n>=5, round(c^prime(n)) == 1 (mod 2*prime(n)). Proof in Shevelev link. In particular, all terms are even.

Crossrefs

A318623 a(n) = 2^phi(n) mod n.

Original entry on oeis.org

0, 0, 1, 0, 1, 4, 1, 0, 1, 6, 1, 4, 1, 8, 1, 0, 1, 10, 1, 16, 1, 12, 1, 16, 1, 14, 1, 8, 1, 16, 1, 0, 1, 18, 1, 28, 1, 20, 1, 16, 1, 22, 1, 12, 1, 24, 1, 16, 1, 26, 1, 40, 1, 28, 1, 8, 1, 30, 1, 16, 1, 32, 1, 0, 1, 34, 1, 52, 1, 36, 1, 64, 1, 38, 1, 20, 1, 40, 1
Offset: 1

Views

Author

Jianing Song, Aug 30 2018

Keywords

Comments

Of course, a(n) = 0 iff n is a power of 2 and a(n) = 1 iff n is an odd number > 1. For other n, let n = 2^t*s, t > 0, s > 1 is an odd number, then a(n) is the unique solution to x == 0 (mod 2^t) and x == 1 (mod s).

Examples

			a(6) = 2^phi(6) mod 6 = 2^4 mod 6 = 4.
a(18) = 2^phi(18) mod 18 = 2^6 mod 18 = 10.
		

Crossrefs

Programs

  • Magma
    [Modexp(2, EulerPhi(n), n): n in [1..110]]; // Vincenzo Librandi, Aug 02 2018
  • Mathematica
    a[n_] = Mod[2^EulerPhi[n], n]; Array[a, 50] (* Stefano Spezia, Sep 01 2018 *)
    Table[PowerMod[2,EulerPhi[n],n],{n,80}] (* Harvey P. Dale, Nov 07 2021 *)
  • PARI
    a(n) = lift(Mod(2, n)^(eulerphi(n)))
    

Formula

If n is a power of 2 then a(n) = 0; if n is an odd number > 1 then a(n) = 1; else, let n = 2^t*s, t > 0, s > 1 is an odd number, then a(n) = n - (s mod 2^t)^2 + 1.
Previous Showing 11-20 of 33 results. Next