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.

A373083 a(1) = 1; for n > 1, a(n) = a(n-1) + n if n is prime, else a(n) = a(n-1) + largest divisor of n < n.

This page as a plain text file.
%I A373083 #45 Jul 11 2024 13:16:39
%S A373083 1,3,6,8,13,16,23,27,30,35,46,52,65,72,77,85,102,111,130,140,147,158,
%T A373083 181,193,198,211,220,234,263,278,309,325,336,353,360,378,415,434,447,
%U A373083 467,508,529,572,594,609,632,679,703,710,735,752,778,831,858,869,897
%N A373083 a(1) = 1; for n > 1, a(n) = a(n-1) + n if n is prime, else a(n) = a(n-1) + largest divisor of n < n.
%C A373083 Differs from A219730 at a(12).
%H A373083 James C. McMahon, <a href="/A373083/b373083.txt">Table of n, a(n) for n = 1..1000</a>
%F A373083 a(n) = a(n-1) + A117818(n) for n > 1. - _Michael De Vlieger_, Jun 23 2024
%e A373083 From _Michael De Vlieger_, Jun 23 2024: (Start)
%e A373083 Let lpf = A020639(n).
%e A373083 a(2) = 3 since 2 is prime, therefore a(1) + 2 = 3.
%e A373083 a(3) = 6 since 3 is prime, therefore a(2) + 3 = 6.
%e A373083 a(4) = 8 since 4 is not prime, therefore a(3) + 4/lpf(4) = 6 + 2 = 8.
%e A373083 a(5) = 13 since 5 is prime, therefore a(4) + 5 = 13.
%e A373083 a(6) = 16 since 6 is not prime, hence a(5) + 6/lpf(6) = 13 + 3 = 16, etc. (End)
%t A373083 a[1]=1;a[n_]:=If[PrimeQ[n],a[n-1]+n,a[n-1]+Divisors[n][[-2]]];Table[a[n],{n,56}]
%o A373083 (PARI) alist(N) = my(r, d); vector(N, n, r+=if(2<#d=divisors(n), d[#d-1], d[#d])); \\ _Ruud H.G. van Tol_, Jul 11 2024
%Y A373083 Cf. A117818, A219730.
%K A373083 nonn,easy
%O A373083 1,2
%A A373083 _James C. McMahon_, Jun 17 2024