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.

A307856 a(1) = a(2) = 1; a(n) = Sum_{1 < k < n, k not dividing n} a(k).

This page as a plain text file.
%I A307856 #23 Dec 27 2023 23:44:32
%S A307856 1,1,1,1,3,4,10,18,37,71,146,285,577,1143,2293,4570,9160,18277,36597,
%T A307856 73118,146301,292466,585079,1169848,2340003,4679431,9359402,18717687,
%U A307856 37436529,74870685,149743743,299482896,598970235,1197931456,2395872060,4791725527,9583469660,19166902722
%N A307856 a(1) = a(2) = 1; a(n) = Sum_{1 < k < n, k not dividing n} a(k).
%H A307856 G. C. Greubel, <a href="/A307856/b307856.txt">Table of n, a(n) for n = 1..1000</a>
%F A307856 G.f. A(x) satisfies: A(x) = x*(1 + x) + A(x)/(1 - x) - Sum_{k>=1} A(x^k).
%F A307856 G.f.: A(x) = Sum_{n>=1} a(n)*x^n = x * (1 + x + (1/(1 - x)) * Sum_{n>=1} a(n)*x^n*(1 - x^(n-1))/(1 - x^n)).
%F A307856 a(n) ~ c * 2^n, where c = 0.0697287852138897098746368547699891689134990049613293203832908827967121295... - _Vaclav Kotesovec_, May 06 2019
%p A307856 a := proc(n) local j; option remember;
%p A307856 if n < 3 then 1;
%p A307856 else add(`if`(`mod`(n, j) <> 0, a(j), 0), j = 2 .. n - 1);
%p A307856 end if; end proc;
%p A307856 seq(a(n), n = 1..40); # _G. C. Greubel_, Mar 08 2021
%t A307856 a[n_] := a[n] = Sum[Boole[Mod[n, k] != 0] a[k], {k,n-1}]; a[1] = a[2] = 1; Table[a[n], {n, 1, 38}]
%t A307856 terms = 38; A[_] = 0; Do[A[x_] = x (1 + x) + A[x]/(1 - x) - Sum[A[x^k], {k, 1, terms}] + O[x]^(terms + 1) // Normal, terms + 1]; Rest[CoefficientList[A[x], x]]
%t A307856 a[n_] := a[n] = SeriesCoefficient[x (1 + x + 1/(1 - x) Sum[a[k] x^k (1 - x^(k - 1))/(1 - x^k), {k, 1, n - 1}]), {x, 0, n}]; Table[a[n], {n, 1, 38}]
%o A307856 (Sage)
%o A307856 @CachedFunction
%o A307856 def a(n):
%o A307856     if n<3: return 1
%o A307856     else: return sum( a(j) if n%j!=0 else 0 for j in (2..n-1) )
%o A307856 [a(n) for n in (1..40)] # _G. C. Greubel_, Mar 08 2021
%Y A307856 Cf. A003238, A045545.
%Y A307856 Second column of A155033.
%K A307856 nonn
%O A307856 1,5
%A A307856 _Ilya Gutkovskiy_, May 01 2019