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 21-26 of 26 results.

A087611 a(n) = (prime(n) - 1) mod n.

Original entry on oeis.org

0, 0, 1, 2, 0, 0, 2, 2, 4, 8, 8, 0, 1, 0, 1, 4, 7, 6, 9, 10, 9, 12, 13, 16, 21, 22, 21, 22, 21, 22, 2, 2, 4, 2, 8, 6, 8, 10, 10, 12, 14, 12, 18, 16, 16, 14, 22, 30, 30, 28, 28, 30, 28, 34, 36, 38, 40, 38, 40, 40, 38, 44, 54, 54, 52, 52, 62, 64, 1, 68, 68, 70, 1, 2, 3, 2, 3, 6, 5, 8
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 11 2003

Keywords

Crossrefs

Cf. A023143 (indices of 0's).

Programs

  • Magma
    [((NthPrime(n) -1) mod n): n in [1..100]]; // Vincenzo Librandi, Apr 06 2011
    
  • PARI
    a(n) = (prime(n)-1) % n; \\ Kevin Ryde, Feb 03 2023

A116662 Numbers k such that prime(k) == 15 (mod k).

Original entry on oeis.org

1, 2, 4, 13, 14, 41, 46, 446, 1066, 16054, 251713, 251738, 251764, 251789, 27067052, 27067124, 465769808, 465769816, 1208198606, 1208198632, 145935689368
Offset: 1

Views

Author

Zak Seidov, Feb 21 2006

Keywords

Comments

Starting with a(6), positions of 15 in A004648. - corrected by Eric M. Schmidt, Feb 05 2013

Crossrefs

Cf. A004648; A023143-A023152, A116657, A116677, A116658, A116659, prime(n) == m (mod n), m=1-10,11,12,13,14.

Programs

  • Python
    from gmpy2 import next_prime
    def A116662(max) :
        terms = []
        p = 2
        for n in range(1, max+1) :
            if (p - 15) % n == 0 : terms.append(n)
            p = next_prime(p)
        return terms # Eric M. Schmidt, Feb 05 2013

Extensions

More terms from Ryan Propper, Jul 21 2006
a(21) from Donovan Johnson, Dec 07 2008
Edited by and first five terms inserted by Eric M. Schmidt, Feb 05 2013

A225939 Numbers k that divide prime(k) + prime(k-1).

Original entry on oeis.org

4, 6, 13, 14, 15, 74, 190, 688, 690, 6456, 40082, 251735, 251736, 251738, 399916, 637325, 637326, 637342, 637343, 2582372, 2582434, 4124456, 4124458, 6592686, 10553425, 10553433, 10553818, 27067038, 27067053, 43435902, 69709872, 69709877, 69709945, 69709954, 179992917
Offset: 1

Views

Author

Alex Ratushnyak, May 21 2013

Keywords

Examples

			prime(3) + prime(4) = 5+7 = 12, because 12 is divisible by 4, the latter is in the sequence.
prime(5) + prime(6) = 11+13 = 24, because 24 is divisible by 6, the latter is in the sequence.
		

Crossrefs

Programs

  • C
    #include 
    #define TOP (1ULL<<32)
    int main() {
      unsigned long long i, j, n = 1, prev;
      char *c = (char*)malloc(TOP/2);
      memset(c, 0, TOP/2);
      for (prev = 2, i = 3; i < TOP; i += 2)
        if (c[i>>1]==0) {
          if ((i+prev) % ++n == 0)  printf("%llu, ", n);
          for (prev = i, j = i*i>>1; j < TOP/2; j += i)  c[j] = 1;
        }
      return 0;
    }
    
  • Mathematica
    Select[Range[2,10^4],Divisible[Prime@#+Prime[#-1],#]&] (* Giorgos Kalogeropoulos, Aug 20 2021 *)
  • Sage
    def is_a(n): return (nth_prime(n) + nth_prime(n-1)) % n == 0
    filter(is_a, (2..1000))  # Peter Luschny, May 22 2013

A260989 Integers n such that prime(n-1) + prime(n+1) is a multiple of n.

Original entry on oeis.org

4, 5, 8, 11, 12, 18, 20, 70, 72, 1053, 4116, 6459, 6460, 40083, 63328, 251742, 399924, 637320, 637322, 637330, 2582288, 2582436, 2582488, 10553828, 16899042, 69709721, 179992913, 179992922, 465769813, 749973302, 749973314, 1208198617, 1208198629
Offset: 1

Views

Author

Zak Seidov, Aug 06 2015

Keywords

Examples

			n=4: prime(n-1) + prime(n+1) = 5 + 11 = 16 = 4*n,
n=20: 67 + 73 = 140 = 7*n,
n=16899042: 312632263 + 312632291 = 625264554 = 37*n,
n=69709721: 1394194387 + 1394194453 = 2788388840 = 40*n.
		

Crossrefs

Programs

  • Magma
    [n: n in [2..7*10^3], k in [2..7*10^3] | (NthPrime(n-1) + NthPrime(n+1)) eq n*k]; // Vincenzo Librandi, Aug 07 2015
  • Mathematica
    Select[Range[2, 100000], Mod[Prime[# - 1] + Prime[# + 1], #] == 0 &] (* Michael De Vlieger, Aug 07 2015 *)
  • PARI
    a=2;b=5;for(n=2,10^8,c=a+b;if(c%n<1,print1(n", "));a=nextprime(a+1);b=nextprime(b+1))
    
  • PARI
    p=2;q=3;n=1; forprime(r=5,1e9, if((p+r)%n++==0, print1(n", "));p=q;q=r) \\ Charles R Greathouse IV, Aug 10 2015
    

Extensions

a(27)-a(33) from Charles R Greathouse IV, Aug 10 2015

A064936 Primes p such that gcd(p, prime(p)^2 - 1) does not equal 1.

Original entry on oeis.org

2, 3, 5, 181, 40087, 251737, 335276334037181, 115423110870118057, 115423110870118561
Offset: 1

Views

Author

Robert G. Wilson v, Oct 26 2001

Keywords

Comments

No further terms up to 41161739. - Harvey P. Dale, Dec 23 2011
No further terms up to 250000000. - Sean A. Irvine, Aug 01 2023
From Jason Yuen, Apr 21 2024: (Start)
Primes p such that prime(p)^2 == 1 (mod p).
Prime terms of A023143 or A045924.
No further terms up to 4*10^19. (End)

Examples

			5 belongs in the sequence because gcd(5, P_5^2 -1) = gcd(5, 120) = 5.
		

Crossrefs

Programs

  • Mathematica
    Do[ If[ GCD[ Prime[n], Prime[ Prime[n]]^2 - 1] != 1, Print[ Prime[n]] ], {n, 1, 10^6} ]

A099641 Number of solutions to x*frac[p(x)/x]<=Log[n] or A004648(n)<=Log[n].

Original entry on oeis.org

1, 5, 6, 12, 13, 14, 15, 31, 32, 34, 69, 73, 74, 75, 76, 77, 181, 445, 1052, 6455, 6456, 6457, 6459, 6460, 6466, 15928, 16055, 40073, 40078, 40080, 40081, 40082, 40083, 40122, 100362, 100364, 100365, 251707, 251711, 251712, 251717, 251719, 251721
Offset: 1

Views

Author

Labos Elemer, Nov 02 2004

Keywords

Comments

Solutions appear in clusters because of features of diagram visible at A004648. Later clusters are introduced by 6455, 15928, 40073, 100362, 251707, 637235, 4124455, respectively.
Number of solutions in consecutive clusters seem to be as follows: 1,2,4,3,6,1,1,1,6,2,7,3 etc..

Crossrefs

Programs

  • Mathematica
    ta={{0}};Do[s=w*fra[Prime[w]/w];If[ !Greater[s, Log[n]], Print[w]; ta=Append[ta, w]], {w, 1, 1000000}];ta=Delete[ta, 1]
Previous Showing 21-26 of 26 results.