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.

A357414 Number of nonempty subsets of {1..n} whose elements have an even geometric mean.

This page as a plain text file.
%I A357414 #30 Mar 07 2025 07:49:55
%S A357414 0,0,1,1,4,4,5,5,8,12,13,13,20,20,21,21,30,30,59,59,62,62,63,63,94,
%T A357414 104,105,187,190,190,191,191,306,306,307,307,564,564,565,565,582,582,
%U A357414 583,583,586,600,601,601,1120,1134,1275,1275,1278,1278,2125,2125,2144,2144,2145,2145,2360,2360,2361,2381,3938,3938,3939,3939,3942,3942,3943,3943,6560,6560,6561,9663,9666
%N A357414 Number of nonempty subsets of {1..n} whose elements have an even geometric mean.
%H A357414 Max Alekseyev, <a href="/A357414/b357414.txt">Table of n, a(n) for n = 0..255</a>
%F A357414 a(p) = a(p-1) for prime p > 2. - _Michael S. Branicky_, Sep 30 2022
%F A357414 a(n) = A326027(n) - A357413(n). - _Max Alekseyev_, Mar 06 2025
%e A357414 a(8) = 8 subsets: {2}, {4}, {6}, {8}, {1, 4}, {2, 8}, {1, 2, 4} and {2, 4, 8}.
%o A357414 (Python)
%o A357414 from functools import lru_cache
%o A357414 from sympy import integer_nthroot
%o A357414 def cond(p, c): r, b = integer_nthroot(p, c); return b and r&1 == 0
%o A357414 @lru_cache(maxsize=None)
%o A357414 def b(n, p, c):
%o A357414     if n == 0: return int (c > 0 and cond(p, c))
%o A357414     return b(n-1, p, c) + b(n-1, p*n, c+1)
%o A357414 a = lambda n: b(n, 1, 0)
%o A357414 print([a(n) for n in range(26)]) # _Michael S. Branicky_, Sep 29 2022
%Y A357414 Cf. A326027, A357356, A357412, A357413, A357416.
%K A357414 nonn
%O A357414 0,5
%A A357414 _Ilya Gutkovskiy_, Sep 27 2022
%E A357414 a(24)-a(41) from _Michael S. Branicky_, Sep 30 2022
%E A357414 Terms a(42) onward from _Max Alekseyev_, Oct 11 2023
%E A357414 a(0) prepended by _Max Alekseyev_, Mar 06 2025