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

A067185 Numbers k such that prime(k+1) + prime(k) == 1 (mod k).

Original entry on oeis.org

1, 7, 17, 109, 281, 1669, 6592663, 16899113, 16899145, 16899295, 749973611, 5067034877, 5067034925, 34487825911, 1626582230375
Offset: 1

Views

Author

Benoit Cloitre, Feb 19 2002

Keywords

Crossrefs

Cf. A066895 (== 0 instead of 1).

Programs

  • Mathematica
    a = b = 0; Do[b = Prime[n + 1]; If[Mod[a + b, n] == 1, Print[n]]; a = b, {n, 1, 10^9}]
  • PARI
    isok(k) = (prime(k+1) + prime(k)) % k == 1; \\ Michel Marcus, Feb 17 2021
  • Sage
    def A067185(max):
        terms = []
        p = 2
        for n in range(1, max + 1):
            q = next_prime(p)
            if not (p + q - 1) % n:
                terms.append(n)
            p = q
        return terms
    # Eric M. Schmidt, Feb 05 2013
    

Extensions

Edited and extended by Robert G. Wilson v, Feb 19 2002
Extended by David W. Wilson, Feb 20 2002
a(11)-a(14) from Donovan Johnson, Mar 10 2010
First term from 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
Showing 1-2 of 2 results.