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.

A227418 Array A(n,k) with all numbers m such that 3*m^2 +- 3^k is a square and their corresponding square roots, read by downward antidiagonals.

This page as a plain text file.
%I A227418 #40 Feb 19 2025 17:31:45
%S A227418 0,1,1,0,2,4,3,3,7,15,0,6,12,26,56,9,9,21,45,97,209,0,18,36,78,168,
%T A227418 362,780,27,27,63,135,291,627,1351,2911,0,54,108,234,504,1086,2340,
%U A227418 5042,10864,81,81,189,405,873,1881,4053,8733,18817,40545
%N A227418 Array A(n,k) with all numbers m such that 3*m^2 +- 3^k is a square and their corresponding square roots, read by downward antidiagonals.
%C A227418 Array is analogous to A228405 in goal and structure, with key differences.
%C A227418 Left column is A001353.  Top row (not in OEIS) interleaves 0 with the powers of 3, as: 0, 1, 0, 3, 0, 9, 0, 27, 0, 81.
%C A227418 Either or both may be used as initializing values. See Formula section.
%C A227418 The left column is the second binomial transform of the top row. The intermediate transform sequence is A002605, not present in this array.
%C A227418 The columns of the array hold all values, in sequential order, of numbers m such that 3*m^2 + 3^k or 3*m^2 - 3^k are squares, and their corresponding square roots in the next column, which then form the "next round" of m values for column k+1.
%C A227418 For example: A(n,0) are numbers such that 3*m^2 + 1 are squares, the integer square roots of each are in A(n,1), which are then numbers m such that 3*m^2 - 3 are squares, with those square roots in A(n,2), etc.  The sign alternates for each increment of k, etc. No integer square roots exist for the opposite sign in a given column, regardless of n.
%C A227418 Also, A(n,1) are values of m such that floor(m^2/3) is square, with the corresponding square roots given by A(n,0).
%C A227418 A(n,k)/A(n,k-2) = 3; A(n,k)/A(n,k-1) converges to sqrt(3) for large n.
%C A227418 A(n,k)/A(n-1,k) converges to 2 + sqrt(3) for large n.
%C A227418 Several ways of combining the first few columns give OEIS sequences:
%C A227418   A(n,0) + A(n,1) = A001835; A(n,1) + A(n,2)= A001834; A(n,2) + A(n,3) = A082841;
%C A227418   A(n,0)*A(n,1)/2 = A007655(n); A(n+2,0)*A(n+1,1) = A001922(n);
%C A227418   A(n,0)*A(n+1,1) = A001921(n); A(n,0)^2 + A(n,1)^2 = A103974(n);
%C A227418   A(n,1)^2 - A(n,0)^2 = A011922(n); (A(n+2,0)^2 + A(n+1,1)^2)/2 = A122770(n) = 2*A011916(n).
%C A227418 The main diagonal (without initial 0) = 2*A090018.  The first subdiagonal =  abs(A099842). First superdiagonal = A141041.
%C A227418 A001353 (in left column) are the only initializing set of numbers where the recursive square root equation (see below) produces exclusively integer values, for all iterations of k.  For any other initial values only even iterations (at k = 2, 4, ...) produce integers.
%H A227418 G. C. Greubel, <a href="/A227418/b227418.txt">Antidiagonals n = 0..50, flattened</a>
%F A227418 If using the left column and top row to initialize, then: A(n,k) = 2*A(n, k-1) - A(n-1, k-1).
%F A227418 If using only the top row to initialize, then: A(n,k) = 4*A(n-1,k) - A(n-2,k).
%F A227418 If using the left column to initialize, then: A(n,k) = sqrt(3*A(n,k-1) + (-3)^(k-1)), for all n, k > 0.
%F A227418 Other internal relationships that apply are: A(2*n-1, 2*k) = A(n,k)^2 - A(n-1,k)^2;
%F A227418 A(n+1,k) * A(n,k+1) - A(n+1, k+1) * A(n,k) = (-3)^k, for all n, k > 0.
%F A227418 A(n, 0) = A001353(n).
%F A227418 A(n, 1) = A001075(n).
%F A227418 A(n, 2) = A005320(n).
%F A227418 A(n, 3) = A151961(n).
%F A227418 A(1, k) = A038754(k).
%F A227418 A(n, n) = 2*A090018(n), for n > 0 (main diagonal).
%F A227418 A(n, n+1) = A141041(n-1) (superdiagonal).
%F A227418 A(n+1, n) = abs(A099842(n)) (subdiagonal).
%F A227418 From _G. C. Greubel_, Oct 09 2022: (Start)
%F A227418 T(n, 0) = (1/2)*(1-(-1)^n)*3^((n-1)/2).
%F A227418 T(n, 1) = A038754(n-1).
%F A227418 T(n, 2) = A228879(n-2).
%F A227418 T(2*n-1, n-1) = A141041(n-1).
%F A227418 T(2*n, n) = 2*A090018(n-1), n > 0.
%F A227418 T(n, n-4) = 3*A005320(n-4).
%F A227418 T(n, n-3) = 3*A001075(n-3).
%F A227418 T(n, n-2) = 3*A001353(n-2).
%F A227418 T(n, n-1) = A001075(n-1).
%F A227418 T(n, n) = A001353(n).
%F A227418 Sum_{k=0..n-1} T(n, k) = A084156(n).
%F A227418 Sum_{k=0..n} T(n, k) = A084156(n) + A001353(n). (End)
%e A227418 The array, A(n, k), begins as:
%e A227418     0,    1,    0,    3,    0,     9,     0,    27, ... see A000244;
%e A227418     1,    2,    3,    6,    9,    18,    27,    54, ... A038754;
%e A227418     4,    7,   12,   21,   36,    63,   108,   189, ... A228879;
%e A227418    15,   26,   45,   78,  135,   234,   405,   702, ...
%e A227418    56,   97,  168,  291,  504,   873,  1512,  2619, ...
%e A227418   209,  362,  627, 1086, 1881,  3258,  5643,  9774, ...
%e A227418   780, 1351, 2340, 4053, 7020, 12159, 21060, 36477, ...
%e A227418 Antidiagonal triangle, T(n, k), begins as:
%e A227418    0;
%e A227418    1,  1;
%e A227418    0,  2,   4;
%e A227418    3,  3,   7,  15;
%e A227418    0,  6,  12,  26,  56;
%e A227418    9,  9,  21,  45,  97,  209;
%e A227418    0, 18,  36,  78, 168,  362,  780;
%e A227418   27, 27,  63, 135, 291,  627, 1351, 2911;
%e A227418    0, 54, 108, 234, 504, 1086, 2340, 5042, 10864;
%e A227418   81, 81, 189, 405, 873, 1881, 4053, 8733, 18817, 40545;
%t A227418 A[n_, k_]:= If[k<0, 0, If[k==0, ChebyshevU[n-1, 2], 2*A[n, k-1] - A[n-1, k-1]]];
%t A227418 T[n_, k_]:= A[k, n-k];
%t A227418 Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* _G. C. Greubel_, Oct 09 2022 *)
%o A227418 (Magma)
%o A227418 function A(n,k)
%o A227418   if k lt 0 then return 0;
%o A227418   elif n eq 0 then return Round((1/2)*(1-(-1)^k)*3^((k-1)/2));
%o A227418   elif k eq 0 then return Evaluate(ChebyshevSecond(n), 2);
%o A227418   else return 2*A(n, k-1) - A(n-1, k-1);
%o A227418   end if; return A;
%o A227418 end function;
%o A227418 A227418:= func< n,k | A(k, n-k) >;
%o A227418 [A227418(n,k): k in [0..n], n in [0..15]]; // _G. C. Greubel_, Oct 09 2022
%o A227418 (SageMath)
%o A227418 def A(n,k):
%o A227418     if (k<0): return 0
%o A227418     elif (k==0): return chebyshev_U(n-1,2)
%o A227418     else: return 2*A(n, k-1) - A(n-1, k-1)
%o A227418 def A227418(n, k): return A(k, n-k)
%o A227418 flatten([[A227418(n,k) for k in range(n+1)] for n in range(15)]) # _G. C. Greubel_, Oct 09 2022
%Y A227418 Cf. A001353, A001075, A005320, A038754, A090018, A099842, A141041, A151961.
%Y A227418 Cf. A000244, A084156, A228879.
%K A227418 nonn,tabl
%O A227418 0,5
%A A227418 _Richard R. Forberg_, Sep 02 2013
%E A227418 Offset corrected by _G. C. Greubel_, Oct 09 2022