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.
%I A139556 #15 Apr 29 2025 13:42:56 %S A139556 1,1,3,4,10,6,15,16,27,20,39,24,50,42,46,49,79,54,96,80,96,74,115,96, %T A139556 133,120,151,153,190,120,219,220,232,203,245,181,282,238,267,227,319, %U A139556 252,360,330,334,318,403,349,443,407,443,424,499,451,511,434,494,461 %N A139556 a(n) = sum of the prime-powers (including 1) that each are <= n and are coprime to n. %H A139556 Robert Price, <a href="/A139556/b139556.txt">Table of n, a(n) for n = 1..5000</a> %e A139556 All the positive integers <= 21 that are coprime to 21 are 1,2,4,5,8,10,11,13,16,17,19,20. Of these integers, only 1,2,4,5,8,11,13,16,17,19 are prime-powers. The sum of these prime-powers is 1+2+4+5+8+11+13+16+17+19 = 96; so a(21) = 96. %p A139556 isA000961 := proc(n) if n = 1 or isprime(n) then true; else RETURN(nops(ifactors(n)[2]) =1) ; fi ; end: A139556 := proc(n) local a,i; a := 0 ; for i from 1 to n do if isA000961(i) and gcd(i,n) = 1 then a := a+i ; fi ; od: a ; end: seq(A139556(n),n=1..100) ; # _R. J. Mathar_, May 12 2008 %t A139556 f[n_] := Plus @@ Select[Range@ n, Length@ FactorInteger@ # == 1 == GCD[n, # ] &]; Array[f, 58] (* _Robert G. Wilson v_ *) %Y A139556 Cf. A000961, A139555. %K A139556 nonn %O A139556 1,3 %A A139556 _Leroy Quet_, Apr 27 2008 %E A139556 More terms from _R. J. Mathar_, May 12 2008