A073934 Sum of terms in n-th row of triangle in A073932.
1, 3, 6, 7, 12, 12, 19, 15, 21, 22, 33, 24, 37, 33, 37, 31, 48, 39, 58, 42, 54, 55, 78, 48, 67, 63, 66, 61, 90, 67, 98, 63, 88, 82, 96, 75, 112, 96, 102, 82, 123, 96, 139, 99, 112, 124, 171, 96, 145, 117, 133, 115, 168, 120, 154, 117, 153, 148, 207, 127, 188, 160
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Programs
-
Maple
a[1] := 1:for i from 2 to 500 do n := i:s := n:while(n>1) do if isprime(n) then r := n-1: else r := n-n/ifactors(n)[2][1][1]; fi; n := r:s := s+n:od:a[i] := s:od:seq(a[k],k=1..500);
-
Mathematica
Array[If[# == 1, 1, Total@ NestWhileList[If[PrimeQ@ #, # - 1, # - #/FactorInteger[#][[1, 1]] ] &, #, # > 1 &]] &, 62]
-
Scheme
(define (A073934 n) (if (= 1 n) n (+ n (A073934 (A060681 n))))) (define (A060681 n) (- n (A032742 n))) ;; See also code under A032742 ;; Antti Karttunen, Aug 23 2017
Formula
a(1) = 1; for n > 1, a(n) = n + a(A060681(n)). - Antti Karttunen, Aug 23 2017
Extensions
More terms from Sascha Kurz, Aug 23 2002
Offset corrected from 0 to 1 by Antti Karttunen, Aug 23 2017