The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A289506 Write n as a product of primes p_{s_1}*p_{s_2}*p_{s_3}*... where p_i denotes the i-th prime; then a(n) = s_1^2 + s_2^2 + s_3^2 + ... 14
 0, 1, 4, 2, 9, 5, 16, 3, 8, 10, 25, 6, 36, 17, 13, 4, 49, 9, 64, 11, 20, 26, 81, 7, 18, 37, 12, 18, 100, 14, 121, 5, 29, 50, 25, 10, 144, 65, 40, 12, 169, 21, 196, 27, 17, 82, 225, 8, 32, 19, 53, 38, 256, 13, 34, 19, 68, 101, 289, 15, 324, 122, 24, 6 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS When gcd_j(s_j) = 1, a(n) is the modulus of the determinant whose first row consists of the s_j, and whose remaining rows form a lattice basis for the space of integer solutions of Sum_j s_jx_j = 0. See A289507. Compare A056239, where the same encoding for integer multisets ('Heinz encoding') is used, but where A056239(n) is the sum, rather than the sum of squares, of the elements of the corresponding multiset (partition). See also A003963, for which A003963(n) is the product of the elements of the corresponding multiset. See also A289507, where terms are (Sum_j s_j^2)/gcd_j(s_j) rather than Sum_j s_j^2 (this sequence). LINKS Alois P. Heinz, Table of n, a(n) for n = 1..20000 FORMULA For n = Product_k p_k^{r_k}, a(n) = Sum_k k^2 * r_k. Also a(n) = Sum_j s_j^2, where the multiset of s_j's is the multiset of k's, each with multiplicity r_k. EXAMPLE For n = 12 = 2^2 * 3 = p_1 * p_1 * p_2, the multiset is {1,1,2} and so a(12) = 1^2 + 1^2 + 2^2 = 6. Also a(1) = 0 as n = 1 indexes the empty multiset. Further a(p_k) = k^2 and a(2^r) = r. MAPLE p:=1:for ind to 1000 do p:=nextprime(p); primeindex[p]:=ind; od: # so primeindex[p]:=k if p is the k-th prime out:=[0]:for n from 2 to 100 do f:=ifactors(n)[2]; m:=[]; for k to nops(f) do pow:=f[k]; ind:=primeindex[pow[1]]; for e to pow[2] do m:=[op(m), ind]; od; od; out:=[op(out), sum(m[jj]^2, jj=1..nops(m))]; od:print(out); # second Maple program: a:= n-> add(numtheory[pi](i[1])^2*i[2], i=ifactors(n)[2]): seq(a(n), n=1..80);  # Alois P. Heinz, Aug 05 2017 MATHEMATICA Table[Total[FactorInteger[n] /. {p_, e_} /; p > 0 :> e PrimePi[p]^2], {n, 64}] (* Michael De Vlieger, Jul 12 2017 *) PROG (PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, primepi(f[k, 1])^2*f[k, 2]); \\ Michel Marcus, Jul 19 2017 CROSSREFS Cf. A003963, A056239, A289507. Sequence in context: A191663 A206561 A008831 * A213778 A095833 A163990 Adjacent sequences:  A289503 A289504 A289505 * A289507 A289508 A289509 KEYWORD nonn,look,easy AUTHOR Christopher J. Smyth, Jul 07 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 20 07:41 EST 2020. Contains 332069 sequences. (Running on oeis4.)