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.

Showing 1-2 of 2 results.

A385645 a(n) is the number of distinct sums of distinct prime powers dividing n.

Original entry on oeis.org

1, 3, 3, 7, 3, 6, 3, 15, 7, 7, 3, 10, 3, 7, 7, 31, 3, 13, 3, 12, 7, 7, 3, 18, 7, 7, 15, 14, 3, 11, 3, 63, 7, 7, 7, 19, 3, 7, 7, 20, 3, 13, 3, 15, 14, 7, 3, 34, 7, 15, 7, 15, 3, 27, 7, 22, 7, 7, 3, 15, 3, 7, 14, 127, 7, 13, 3, 15, 7, 13, 3, 27, 3, 7, 15, 15, 7, 13
Offset: 1

Views

Author

Felix Huber, Jul 11 2025

Keywords

Examples

			The a(4) = 7 distinct sums of distinct prime powers dividing 4 are 1, 2, 4, 1 + 2, 1 + 4, 2 + 4 and 1 + 2 + 4.
		

Crossrefs

Programs

  • Maple
    A385645:=proc(n)
        local b,k,l,i,j;
        l:=[1,seq(seq(i[1]^j,j=1..i[2]),i in ifactors(n)[2])]:
        b:=proc(m,i)
            option remember;
            `if`(m=0,1,`if`(i<1,0,b(m,i-1)+`if`(l[i]>m,0,b(m-l[i],i-1))))
        end;
        return nops(select(x->x>0,[seq(b(k,nops(l)),k=1..add(l))]))
        end:
    seq(A385645(n),n=1..78);

Formula

a(p) = 3 for prime p.
a(p^k) = A119347(p^k) for prime p and nonnegative integer k.
A385646(n) < a(n) <= A119347(n).

A385904 a(n) is the number of nonempty subsets of the divisors of n that sum to a perfect square.

Original entry on oeis.org

1, 1, 2, 2, 1, 4, 1, 3, 3, 2, 1, 11, 1, 3, 4, 5, 1, 9, 1, 9, 3, 3, 1, 27, 2, 2, 4, 8, 1, 27, 1, 7, 3, 2, 2, 49, 1, 1, 3, 22, 1, 21, 1, 7, 8, 3, 1, 77, 2, 5, 2, 4, 1, 22, 2, 21, 2, 1, 1, 248, 1, 2, 7, 11, 1, 21, 1, 4, 2, 17, 1, 235, 1, 1, 9, 7, 1, 20, 1, 64, 6, 1
Offset: 1

Views

Author

Felix Huber, Jul 21 2025

Keywords

Examples

			a(6) = 4 because exactly the 4 nonempty subsets {1}, {1, 3}, {1, 2, 6} and {3, 6} of the divisors of 6 sum to a perfect square: 1 = 1^2, 1 + 3 = 2^2, 1 + 2 + 6 = 3^2.
		

Crossrefs

Programs

  • Maple
    with(NumberTheory):
    A385904:=proc(n)
        local b,l,j;
        l:=[(Divisors(n))[]]:
        b:=proc(m,i)
            option remember;
            `if`(m=0,1,`if`(i<1,0,b(m,i-1)+`if`(l[i]>m,0,b(m-l[i],i-1))))
    	end;
        add(b(j^2,nops(l)),j=1..floor(sqrt(sigma(n))));
    end:
    seq(A385904(n),n=1..82);
  • Mathematica
    a[n_]:=Module[{nb = 0, d = Divisors[n]},Length[Select[Subsets[d],IntegerQ[Sqrt[Total[#]]]&]]]-1;Array[a,82] (* James C. McMahon, Jul 27 2025 *)
  • PARI
    a(n) = my(nb=0, d=divisors(n)); forsubset(#d, s, nb+=issquare(sum(i=1, #s, d[s[i]]))); nb-1; \\ Michel Marcus, Jul 22 2025

Formula

a(p) = 1 for primes p != 3.
Showing 1-2 of 2 results.