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.

A385646 a(n) is the number of distinct sums of distinct prime factors of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 3, 3, 1, 1, 3, 1, 3, 3, 3, 1, 3, 1, 3, 1, 3, 1, 6, 1, 1, 3, 3, 3, 3, 1, 3, 3, 3, 1, 7, 1, 3, 3, 3, 1, 3, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 6, 1, 3, 3, 1, 3, 7, 1, 3, 3, 6, 1, 3, 1, 3, 3, 3, 3, 7, 1, 3, 1, 3, 1, 7, 3, 3, 3, 3
Offset: 1

Views

Author

Felix Huber, Jul 11 2025

Keywords

Examples

			The a(18) = 3 distinct sums of distinct prime factors of 18 = 2*3^2 are 2, 3 and 2 + 3.
The a(42) = 7 distinct sums of distinct prime factors of 42 = 2*3*7 are 2, 3, 7, 2 + 3 = 5, 2 + 7 = 9, 3 + 7 = 10, 2 + 3 + 7 = 12.
The a(30) = 6 distinct sums of distinct prime factors of 30 = 2*3*5 are 2, 3, 2 + 3 = 5, 2 + 5 = 7, 3 + 5 = 8, 2 + 3 + 5 = 10.
		

Crossrefs

Programs

  • Maple
    A385646:=proc(n)
        local b,k,l,i,j;
        l:=[seq(i[1],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(A385646(n),n=1..85);

Formula

a(n) < A385646(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.