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.

A066077 a(n) is the number of x such that sigma(x)-1 is 0 or one of the first n-1 primes.

This page as a plain text file.
%I A066077 #19 Dec 28 2017 13:37:06
%S A066077 1,2,3,4,5,7,8,10,11,14,15,17,18,21,22,25,27,30,31,32,37,38,40,43,46,
%T A066077 48,49,51,53,54,56,58,60,61,63,64,66,67,68,74,75,79,81,86,87,88,89,90,
%U A066077 93,96,97,100,107,108,114,115,117,120,122,123,124,125,128,130,134,135
%N A066077 a(n) is the number of x such that sigma(x)-1 is 0 or one of the first n-1 primes.
%C A066077 Former name was: Smallest x such that p(n) = Sigma[x] - 1.  That did not match the Data.  See A296375 for that sequence.
%H A066077 Iain Fox, <a href="/A066077/b066077.txt">Table of n, a(n) for n = 1..10000</a>
%F A066077 a(n+1)-a(n) = A066075(n).
%p A066077 N:= 100: # To get a(1)..a(N)
%p A066077 P:= ithprime(N-1):
%p A066077 S:= select(t -> isprime(t) and t <= P,map(-1+numtheory:-sigma, [$1..P])):
%p A066077 T:= Statistics:-Tally(sort(S),output=table):
%p A066077 ListTools:-PartialSums([1,seq(T[ithprime(i)],i=1..N-1)]); # _Robert Israel_, Dec 27 2017
%o A066077 (PARI) first(n) = my(res = vector(n), a = 1); res[1] = 1; for(k=2, n, for(x=1, prime(k-1), if(prime(k-1) == (sigma(x) - 1), a++)); res[k] = a); res \\ _Iain Fox_, Dec 28 2017
%Y A066077 Cf. A000040, A000203, A058339, A058340, A066071, A066072, A066073, A066074, A066075, A066076, A066077, A066080.
%K A066077 nonn
%O A066077 1,2
%A A066077 _Labos Elemer_, Dec 03 2001
%E A066077 Edited by _Robert Israel_, Dec 27 2017