login
The nonnegative numbers with 2 instead of 1.
5

%I #40 Oct 10 2024 18:39:33

%S 0,2,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,

%T 26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,

%U 49,50,51,52,53,54,55,56,57,58,59,60,61,62

%N The nonnegative numbers with 2 instead of 1.

%C An autosequence of the first kind is a sequence whose main diagonal in the difference table is A000004 = 0's.

%C This is the case for a(n).

%C Difference table of a(n):

%C 0, 2, 2, 3, 4, 5, ...

%C 2, 0, 1, 1, 1, 1, ...

%C -2, 1, 0, 0, 0, 0, ...

%C 3, -1, 0, 0, 0, 0, ...

%C -4, 1, 0, 0, 0, 0, ...

%C 5, -1, 0, 0, 0, 0, ...

%C etc.

%C The inverse binomial transform of a(n) is (-1)^(n+1)*a(n).

%C 0 followed by A000012(n) is not in the OEIS. See A054977.

%C What is the meaning of a(n)?

%C Among many others, A015441 is an autosequence of the first kind.

%C General form for such autosequence.

%C Starting from the first upper diagonal s0, s1, s2, s3, s4, ...,

%C the autosequence is

%C 0, s0, s0, s0 + s1, s0 + 2*s1, s0 + 3*s1 + s2, s0 + 4*s1 + 3*s2, ... .

%C After 0, the corresponding coefficients are A011973(n).

%H G. C. Greubel, <a href="/A254667/b254667.txt">Table of n, a(n) for n = 0..2500</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1).

%F a(n) = (A164558(n) + (-1)^(n+1)*A164555(n))/A027642(n).

%F a(n) = A063524(n) + A001477(n). - _David A. Corneth_, Aug 03 2018

%F G.f.: (2*x - 2*x^2 + x^3) / (1 - x)^2. - _Michael Somos_, Feb 09 2015

%e G.f. = 2*x + 2*x^2 + 3*x^3 + 4*x^4 + 5*x^5 + 6*x^6 + 7*x^7 + 8*x^8 + ...

%t CoefficientList[Series[(2*x-2*x^2+x^3)/(1-x)^2, {x, 0, 60}], x] (* _G. C. Greubel_, Aug 03 2018 *)

%t a[ n_] := n + Boole[n == 1]; (* _Michael Somos_, Aug 19 2018 *)

%t Join[{0,2},Range[2,70]] (* _Harvey P. Dale_, Oct 10 2024 *)

%o (PARI) {a(n) = n + (n==1)}; /* _Michael Somos_, Feb 09 2015 */

%o (Magma) m:=25; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((2*x-2*x^2+x^3)/(1-x)^2)); // _G. C. Greubel_, Aug 03 2018

%Y Cf. A000004, A001477, A011973, A015441, A027641, A027642, A054977, A063524, A164555, A164558, A233583.

%K nonn,easy

%O 0,2

%A _Paul Curtz_, Feb 04 2015