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.

A111267 Let q(n) = prime(1) + ... + prime(n); a(n) = smallest divisor of q(n) not already in sequence.

Original entry on oeis.org

1, 5, 2, 17, 4, 41, 29, 7, 10, 3, 8, 197, 14, 281, 82, 127, 11, 167, 71, 9, 89, 113, 19, 107, 20, 27, 16, 457, 37, 59, 40, 617, 28, 709, 569, 809, 34, 67, 31, 21, 23, 383, 214, 1277, 38, 1409, 317, 79, 13, 43, 25, 69, 22, 2027, 3169, 161, 6, 193, 3709, 7699, 26, 331, 613, 8893
Offset: 1

Views

Author

N. J. A. Sloane, Nov 03 2005

Keywords

Comments

Does every number appear?
A basic sequence related to additive structure of primes.

Crossrefs

For records see A111268, A111084. For inverse see A111229.

Programs

  • Maple
    with(numtheory); M:=500; p0:=2; a[1]:=1; for n from 2 to M do p0:=p0+ithprime(n); t1:=divisors(p0); t2:=nops(t1); for i from 1 to t2 do d:=t1[i]; hit:=0; for j from 1 to n-1 do if a[j]=d then hit:=1; break; fi; od: if hit = 0 then a[n]:=d; break; fi; od: od: s1:=[seq(a[n],n=1..M)];
  • Mathematica
    Fold[Function[{l, d}, Append[l, SelectFirst[d, FreeQ[l, #] &]]], {}, Divisors@Accumulate@Prime@Range[100]] (* Virgile Andreani, Jul 11 2016 *)