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.

A181390 Absolute difference between (sum of previous terms) and (n-th-odd square) with a(1) = 1.

This page as a plain text file.
%I A181390 #27 Apr 03 2023 16:38:24
%S A181390 1,0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,128,136,144,152,
%T A181390 160,168,176,184,192,200,208,216,224,232,240,248,256,264,272,280,288,
%U A181390 296,304,312,320,328,336,344,352,360,368,376,384,392,400,408,416,424
%N A181390 Absolute difference between (sum of previous terms) and (n-th-odd square) with a(1) = 1.
%H A181390 Vincenzo Librandi, <a href="/A181390/b181390.txt">Table of n, a(n) for n = 1..1000</a>
%H A181390 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1).
%F A181390 a(n) = 8*(n-2) = A008590(n-2), n>1. - _R. J. Mathar_, Oct 18 2010
%F A181390 G.f.: x*(1 - 2*x + 9*x^2)/(-1 + x)^2. -_Alexander R. Povolotsky_, Oct 18 2010
%F A181390 a(1)=1, a(2)=0, a(3)=8, a(n)=2*a(n-1)-a(n-2). -_Harvey P. Dale_, Aug 23 2012
%F A181390 E.g.f.: 16 + 9*x + 8*exp(x)*(x - 2). - _Stefano Spezia_, Apr 03 2023
%t A181390 Module[{lst={1}},Do[AppendTo[lst,Abs[Total[lst]-n^2]],{n,1,111,2}];lst] (* or *) Join[{1},LinearRecurrence[{2,-1},{0,8},60]] (* _Harvey P. Dale_, Aug 23 2012 *)
%t A181390 ad[{t_,n_,a_}]:=Module[{c=Abs[t-(2n-1)^2]},{t+c,n+1,c}]; NestList[ad,{1,1,1},60][[All,3]] (* or  *) Join[{1}, NestList[8 + # &, 0, 60]] (* _Harvey P. Dale_, May 14 2019 *)
%o A181390 (PARI) a(n)=if(n>1,8*n-8,1) \\ _Charles R Greathouse IV_, Jul 31 2013
%Y A181390 Cf. A008590, A022144.
%K A181390 nonn,easy
%O A181390 1,3
%A A181390 _Giovanni Teofilatto_, Oct 17 2010
%E A181390 Adapted g.f. to the offset from _Bruno Berselli_, Aug 01 2013