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.

A330527 Expansion of e.g.f. Sum_{k>=1} (sec(x^k) + tan(x^k) - 1).

This page as a plain text file.
%I A330527 #13 Apr 20 2023 02:10:36
%S A330527 1,3,8,41,136,1381,5312,70265,491776,5977561,40270592,1021246445,
%T A330527 6249389056,135671657941,1919826163712,36481192888145,355897293438976,
%U A330527 12422529973051441,121674189293944832,4514836332133978325
%N A330527 Expansion of e.g.f. Sum_{k>=1} (sec(x^k) + tan(x^k) - 1).
%H A330527 Chai Wah Wu, <a href="/A330527/b330527.txt">Table of n, a(n) for n = 1..449</a>
%F A330527 a(n) = n! * Sum_{d|n} A000111(d) / d!.
%t A330527 nmax = 20; CoefficientList[Series[Sum[(Sec[x^k] + Tan[x^k] - 1), {k, 1, nmax}], {x, 0, nmax}], x] Range[0, nmax]! // Rest
%t A330527 Table[n! DivisorSum[n, If[EvenQ[#], Abs[EulerE[#]], Abs[(2^(# + 1) (2^(# + 1) - 1) BernoulliB[# + 1])/(# + 1)]]/#! &], {n, 1, 20}]
%o A330527 (Python)
%o A330527 from math import factorial
%o A330527 from itertools import accumulate
%o A330527 def A330527(n):
%o A330527     c = a = factorial(n)
%o A330527     blist = (0,1)
%o A330527     for d in range(2,n+1):
%o A330527         blist = tuple(accumulate(reversed(blist),initial=0))
%o A330527         if n % d == 0:
%o A330527             c += a*blist[-1]//factorial(d)
%o A330527     return c # _Chai Wah Wu_, Apr 19 2023
%Y A330527 Cf. A000111, A176475, A330504, A330528.
%K A330527 nonn
%O A330527 1,2
%A A330527 _Ilya Gutkovskiy_, Dec 17 2019