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.

A382279 a(n) is the integer whose bits encode subset sums of the first n arithmetic numbers (A003601).

This page as a plain text file.
%I A382279 #27 Apr 03 2025 11:40:05
%S A382279 1,3,27,891,57339,7340027,15032385531,123145302310907,
%T A382279 2017612633061982203,66113130760175032991739,
%U A382279 8665580274997661924293869563,4543259751217974174964184288067579,4763953136893138488487244504044754960379,9990733848941719167408001786146465954679226363
%N A382279 a(n) is the integer whose bits encode subset sums of the first n arithmetic numbers (A003601).
%C A382279 Bit position 0 (which is sum 0) is the least significant bit of a(n).
%C A382279 The resulting binary string is palindromic for all n. A subset sum of zero marks one end of the binary string, while the sum of the first n arithmetic numbers marks the other end. This is true for all sets of positive integers.  See A368491 for the encoding applied to the first n primes.
%H A382279 Alois P. Heinz, <a href="/A382279/b382279.txt">Table of n, a(n) for n = 0..65</a>
%F A382279 a(n) = a(n-1) OR a(n-1)*2^A003601(n) for n>=1, a(0) = 1.
%e A382279 For n = 0, there are no terms from which to calculate a subset sum. An empty array gives zero as the only possible sum. This is designated by the binary string 1.
%e A382279 For n = 2, sums of 0, 1, 3, 4 are possible, yielding a binary string of 11011, which has a value of 27 in base 10. The impossibility of the sum 2 is indicated by 0 in the binary string.
%e A382279 For n = 3, the arithmetic numbers are 1,3,5 and their subset sums 0, 1, 3, 4, 5, 6, 8, 9 are the positions of 1 bits in a(3) = 891.
%p A382279 b:= proc(n) option remember; uses numtheory; local k; for k from 1+
%p A382279      `if`(n=1, 0, b(n-1)) while irem(sigma(k), tau(k))>0 do od; k
%p A382279     end:
%p A382279 a:= proc(n) option remember; `if`(n=0, 1,
%p A382279       Bits[Or](a(n-1), a(n-1)*2^b(n)))
%p A382279     end:
%p A382279 seq(a(n), n=0..20);  # _Alois P. Heinz_, Mar 20 2025
%o A382279 (Python)
%o A382279 from sympy import divisors, divisor_count
%o A382279 n = 20
%o A382279 tn  = [a for a in range(1, n) if not sum(divisors(a)) % divisor_count(a)] #code from A003601
%o A382279 res = 1
%o A382279 a = []
%o A382279 a.append(res)
%o A382279 for v in tn:
%o A382279   res = (res | (res << v))
%o A382279   a.append(res)
%o A382279 print(a)
%Y A382279 Cf. A003601, A368491.
%K A382279 nonn,base
%O A382279 0,2
%A A382279 _Yigit Oktar_, Mar 20 2025