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

A241014 Let p be the n-th prime, then a(n) = A/p where A is the smallest number (in absolute value) such that F_{p-(p/5)} == A (mod p^2) with F_n = A000045(n) and (p/5) the Legendre symbol.

Original entry on oeis.org

1, 1, 1, 3, 5, 3, -1, 3, -8, -3, -6, 13, -2, -4, 16, -25, 10, -13, 7, -16, -15, -30, 21, 5, 37, -4, 22, 24, 26, -53, 13, 64, 58, -22, -29, 60, 44, -3, 44, -43, -5, -50, 94, 31, -56, 5, -99, 3, -73, 18, 29, 5, -59, -1, 2
Offset: 1

Views

Author

Felix Fröhlich, Aug 13 2014

Keywords

Comments

a(n) is the smallest A such that p is a near-Wall-Sun-Sun prime. A gives the value of F_p-(p/5) modulo p^2 and a value of 0 would indicate a Wall-Sun-Sun prime. A244801 is similar but always gives the positive A, while this sequence gives A with the smallest absolute value.
a(1), with p=2, is technically ambiguous between 1 and -1, so a(1)=1 is by convention. Clearly this cannot happen for n>1 (where p^2 is odd). - Jeppe Stig Nielsen, Sep 09 2021

Crossrefs

Programs

  • Mathematica
    Array[(#3 - #2 Boole[#3 > #2/2])/#1 & @@ {#, #^2, Mod[Fibonacci[# - KroneckerSymbol[#, 5]], #^2]} &@ Prime[#] &, 55] (* Michael De Vlieger, Sep 08 2021 *)
  • PARI
    forprime(p=2, 1e2, a=fibonacci(p-kronecker(p, 5))%p^2; if(a>p^2/2, a-=p^2); a=a/p; print1(a, ", "))
    
  • PARI
    a(n)=my(p=prime(n)); centerlift(((Mod([1, 1; 1, 0], p^2))^(p-kronecker(p,5))))[1, 2]/p \\ Charles R Greathouse IV, Aug 21 2014

A244801 Smallest m such that for the prime p = prime(n) the congruence F_(p-(p/5)) == mp (mod p^2) holds (i.e., smallest m such that prime(n) is a near-Wall-Sun-Sun prime), where F_k is the k-th Fibonacci number and (p/5) is the Legendre symbol.

Original entry on oeis.org

1, 1, 1, 3, 5, 3, 16, 3, 15, 26, 25, 13, 39, 39, 16, 28, 10, 48, 7, 55, 58, 49, 21, 5, 37, 97, 22, 24, 26, 60, 13, 64, 58, 117, 120, 60, 44, 160, 44, 130, 174, 131, 94, 31, 141, 5, 112, 3, 154, 18, 29, 5, 182, 250, 2, 105
Offset: 1

Views

Author

Felix Fröhlich, Jul 06 2014

Keywords

Comments

A value of 0 indicates a Wall-Sun-Sun prime. No such prime is known and if one exists it is > 4*10^16 (cf. PrimeGrid WSS statistics).

Crossrefs

Programs

  • Mathematica
    A= 0; p = 0; While[A < 200, p = NextPrime[p];  A= Mod[(Fibonacci[p-JacobiSymbol[p,5]])/p, p]; Print[A]] (* Javier Rivera Romeu, Jan 11 2022 *)
  • PARI
    forprime(p=2, 10^2, a=fibonacci(p-kronecker(p, 5))%p^2; a=a/p; print1(a, ", "))
    
  • Sage
    A, p = 0, 0
    while A <200:
      p = next_prime(p)
      A = (fibonacci(p-legendre_symbol(p, 5))/p)%p
      print(A, end=", ") #Javier Rivera Romeu, Jan 08 2022

A339855 Primes p such that the absolute value of the fraction A241014(A000720(p)) / p is a record low.

Original entry on oeis.org

2, 3, 5, 17, 41, 101, 163, 223, 251, 733, 1063, 27191, 77969, 84299, 86813, 123863, 508771, 1677209, 11634179, 91978037, 443127523, 467335159, 1041968177, 2025051311, 13941800291, 24178397183, 762383958397, 766193665711, 1551559563569, 8030311150847
Offset: 1

Views

Author

Jeppe Stig Nielsen, Dec 19 2020

Keywords

Comments

So-called near-Wall-Sun-Sun primes. Each term is "nearer" to being Wall-Sun-Sun than all smaller primes.
If any Wall-Sun-Sun primes exist, this sequence terminates at the smallest Wall-Sun-Sun prime.
If you start from p=7 (not p=2), then the sequence will start 7, 13, 17, 41, ... instead.

Crossrefs

Programs

  • PARI
    rec=+oo;forprime(p=2,,r=abs(centerlift(((Mod([1, 1; 1, 0], p^2))^(p-kronecker(p, 5)-1))[1, 1]))/p^2;if(r
    				

A113649 Fibonacci(n-J(n,5)) mod n^2, where J is the Jacobi symbol.

Original entry on oeis.org

0, 2, 3, 2, 5, 5, 21, 34, 21, 55, 55, 89, 39, 37, 160, 98, 272, 293, 57, 365, 150, 101, 345, 433, 25, 665, 696, 709, 754, 440, 775, 994, 883, 1090, 765, 1241, 481, 230, 1511, 1355, 1599, 257, 1677, 805, 20, 1382, 752, 289, 2275, 1525, 1414, 821, 1484
Offset: 1

Views

Author

Eric W. Weisstein, Nov 03 2005

Keywords

Comments

a(n) == 0 for n > 1 iff either n is a Wall-Sun-Sun prime (when n is prime) or a 'Wall-Sun-Sun pseudoprime' (when n is composite). The numbers meeting the second criterion are those composites where the congruence in A241505 is satisfied modulo n^2. No members are known from either of those two sets of numbers. - Felix Fröhlich, May 15 2015

Crossrefs

Cf. A113650.

Programs

A271782 Smallest n-Wall-Sun-Sun prime.

Original entry on oeis.org

13, 241, 2, 3, 191, 5, 2, 3, 2683
Offset: 2

Views

Author

Felix Fröhlich, Apr 18 2016

Keywords

Comments

A prime p is a k-Wall-Sun-Sun prime iff p^2 divides F_k(pi_k(p)), where F_k(n) is the k-Fibonacci numbers, i.e., a Lucas sequence of first kind with (P,Q) = (k,-1), and pi_k(p) is the Pisano period of k-Fibonacci numbers modulo p (cf. A001175, A175181-A175185).
For prime p > 2 not dividing k^2 + 4, it is a k-Wall-Sun-Sun prime iff p^2 | F_k(p-((k^2+4)/p)), where ((k^2+4)/p) is the Kronecker symbol.
a(1) would be the smallest Wall-Sun-Sun prime whose existence is an open question.
a(12)..a(16) = 2, 3, 3, 29, 2. a(18)..a(33) = 3, 11, 2, 23, 3, 3, 2, 5, 79, 3, 2, 7, 23, 3, 2, 239. a(36)..a(38) = 2, 7, 17. a(40), a(41) = 2, 3. a(43)..a(46) = 5, 2, 3, 41. - R. J. Mathar, Apr 22 2016
a(17) = 1192625911, a(35) = 153794959, a(39) = 30132289567, a(47)..a(50) = 139703, 2, 3, 3. If they exist, a(11), a(34), a(42) are greater than 10^12. - Max Alekseyev, Apr 26 2016
Column k = 1 of table T(n, k) of k-th n-Wall-Sun-Sun prime (that table is not yet in the OEIS as a sequence). - Felix Fröhlich, Apr 25 2016
From Richard N. Smith, Jul 16 2019: (Start)
a(n) = 2 if and only if n is divisible by 4.
a(n) = 3 if and only if n == 5, 9, 13, 14, 18, 22, 23, 27, 31 (mod 36). (End)

Crossrefs

Programs

  • PARI
    A271782(k) = forprime(p=2,10^8, if( (([0,1;1,k]*Mod(1,p^2))^(p-kronecker(k^2+4,p)))[1,2]==0, return(p);); ); \\ Max Alekseyev, Apr 22 2016, corrected by Richard N. Smith, Jul 16 2019 to include p=2 and p divides k^2+4

Formula

a(4n) = 2.

Extensions

Edited by Max Alekseyev, Apr 25 2016

A268478 L(p) modulo p^2, where p = prime(n) and L is a Lucas number (A000032).

Original entry on oeis.org

3, 4, 11, 29, 78, 14, 103, 324, 70, 204, 497, 519, 1477, 1420, 1881, 902, 1476, 3600, 3418, 2202, 5257, 317, 914, 5074, 4269, 9192, 5666, 6421, 7086, 4182, 12193, 3800, 1097, 11677, 299, 22651, 17271, 12063, 18371, 26297, 13784, 10137, 8405, 33583, 11230
Offset: 1

Views

Author

Felix Fröhlich, Feb 05 2016

Keywords

Comments

Lemma 7 from the Andrejic paper (p. 42): Prime p is a Wall-Sun-Sun prime iff L(p) == 1 (mod p^2). Therefore, a(n) = 1 iff A113650(n) = 0.

Crossrefs

Programs

  • Magma
    [Lucas(p) mod p^2: p in PrimesUpTo(250)]; // Bruno Berselli, Feb 09 2016
  • Mathematica
    Table[Mod[LucasL[Prime[n]], Prime[n]^2], {n, 60}] (* Vincenzo Librandi, Feb 09 2016 *)
  • PARI
    a000032(n) = fibonacci(n+1) + fibonacci(n-1)
    a(n) = my(p=prime(n)); lift(Mod(a000032(p), p^2))
    

Formula

a(n) = A180363(n) mod A001248(n). - Michel Marcus, Feb 09 2016

A347565 Primes p such that A241014(A000720(p)) is +1 or -1.

Original entry on oeis.org

2, 3, 5, 17, 251, 733, 1063, 123863, 1677209, 6336823451747417, 104868559750360787, 7665762181374748069
Offset: 1

Views

Author

Jeppe Stig Nielsen, Sep 06 2021

Keywords

Comments

Very near misses for Wall-Sun-Sun primes.

Crossrefs

A351989 Fibonacci(p-J(p,5)) mod p^3, where p is the n-th prime and J is the Jacobi symbol.

Original entry on oeis.org

2, 3, 5, 21, 55, 377, 2584, 2584, 9867, 754, 27683, 34706, 55391, 77486, 2961, 49237, 178121, 151768, 269809, 180340, 137459, 440741, 304859, 634125, 3589, 224018, 925249, 689508, 276097, 389850, 1566164, 488892, 101791, 731140, 1838362, 3406409, 31557, 2311014, 3158805, 4571698, 2914836, 3267050, 1294789, 6599056, 7246251, 159399
Offset: 1

Views

Author

Javier Rivera Romeu, Feb 27 2022

Keywords

Comments

Very similar to A113650 but modulo p^3.

Crossrefs

Cf. A113650.

Programs

  • Mathematica
    a[n_]:= Mod[Fibonacci[(n-JacobiSymbol[n, 5])], Power[n, 3]]; Table[a[Prime[n]], {n, 50}]
  • PARI
    a(n) = my(p=prime(n)); lift(Mod([1, 1; 1, 0]^(p-kronecker(p, 5)), p^3)[1, 2]); \\ Michel Marcus, Feb 28 2022
    
  • Python
    from sympy import prime, fibonacci
    from sympy.ntheory import jacobi_symbol
    def A351989(n): return fibonacci((p := prime(n))-jacobi_symbol(p,5)) % p**3 # Chai Wah Wu, Feb 28 2022
  • Sage
    p = 1
    while p < 200:
        print(fibonacci(p-jacobi_symbol(p,5))%pow(p,3), end=', ')
        p = next_prime(p)
    

A339639 a(n) is the sum of the Wieferich and Wall-Sun-Sun residues of prime(n).

Original entry on oeis.org

3, 6, 20, 35, 110, 78, 493, 114, 736, 783, 961, 518, 2542, 2752, 2820, 3392, 1062, 5124, 1139, 4047, 8322, 5372, 5727, 979, 9118, 19089, 8343, 3959, 10137, 16159, 3937, 10611, 15207, 20433, 32184, 17516, 19782, 37001, 15197, 23009, 40096, 50499, 27504, 26055
Offset: 1

Views

Author

Felix Fröhlich, Dec 11 2020

Keywords

Comments

If a(n) = 0 then prime(n) is both a Wieferich prime (A001220) and a Wall-Sun-Sun (Fibonacci-Wieferich) prime.
If the first case of Fermat's last theorem fails for a prime p, that prime is both a Wieferich prime (cf. Wieferich, 1909) and a Wall-Sun-Sun prime (cf. Sun, 1992).

Crossrefs

Programs

  • PARI
    a(n) = my(p=prime(n)); lift(Mod([1, 1; 1, 0]^(p-kronecker(p, 5)), p^2)[1, 2]) + lift(Mod(2, p^2)^(p-1)) - 1

Formula

a(n) = A196202(n) + A113650(n) - 1.
Showing 1-9 of 9 results.