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.

A085020 a(n) = Sum_{d|n, (d+1) prime} (d + 1).

This page as a plain text file.
%I A085020 #17 Jun 04 2019 03:01:06
%S A085020 2,5,2,10,2,12,2,10,2,16,2,30,2,5,2,27,2,31,2,21,2,28,2,30,2,5,2,39,2,
%T A085020 54,2,27,2,5,2,86,2,5,2,62,2,55,2,33,2,52,2,47,2,16,2,63,2,31,2,39,2,
%U A085020 64,2,133,2,5,2,27,2,102,2,10,2,87,2,159,2,5,2,10,2,91,2,79,2,88,2,102,2,5
%N A085020 a(n) = Sum_{d|n, (d+1) prime} (d + 1).
%H A085020 Michel Marcus, <a href="/A085020/b085020.txt">Table of n, a(n) for n = 1..10000</a>
%e A085020 a(18) = 31 because the divisors of 18 are [1, 2, 3, 6, 9, 18] and 2 + 3 + 7 + 19 = 31.
%p A085020 T := proc(n,k) local i; numtheory[divisors](n); select(isprime, map(i->i+k, %)); add(i,i=%) end: seq(T(n+1,1),n=0..20); # _Peter Luschny_, May 04 2009
%t A085020 a[n_] := Sum[If[PrimeQ[d+1], d+1, 0], {d, Divisors[n]}]; Array[a, 100] (* _Jean-François Alcover_, Jun 04 2019 *)
%o A085020 (PARI) a(n) = sumdiv(n, d, if (isprime(q=d+1), q)); \\ _Michel Marcus_, Aug 14 2017
%Y A085020 Cf. A067513.
%Y A085020 Cf. A008472. [_Peter Luschny_, May 04 2009]
%K A085020 easy,nonn
%O A085020 1,1
%A A085020 _Jason Earls_, Jun 18 2003