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.

A160994 a(n) is the least prime number p such that every sum of two or more divisors of p^n is composite.

This page as a plain text file.
%I A160994 #5 Jul 30 2024 14:35:36
%S A160994 3,7,7,19,19,139,151,211,211,211,421,2311,2311,92401,120121,120121,
%T A160994 180181,2312311
%N A160994 a(n) is the least prime number p such that every sum of two or more divisors of p^n is composite.
%t A160994 (* first do *) Needs["Combinatorica`"] (* then *) f[n_] := Block[{d = Divisors@n, k, mx}, k = 1 + Length@d; mx = 2^Length[d]; While[k < mx && !PrimeQ[Plus @@ NthSubset[k, d]], k++ ]; If[k == mx, Length@d, 0]];
%t A160994 a[n_] := a[n] = Module[{p = If[n == 1, 2, a[n-1]]}, While[f[p^n] == 0, p = NextPrime[p]]; p]; Array[a, 13] (* second part of the program added by _Amiram Eldar_, Jul 30 2024 *)
%Y A160994 Cf. A093893, A093894.
%K A160994 nonn,more
%O A160994 1,1
%A A160994 _Robert G. Wilson v_, Jun 01 2009
%E A160994 Offset changed to 1 and name corrected by _Amiram Eldar_, Jul 30 2024