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.

Showing 1-2 of 2 results.

A371381 Main diagonal of A219875.

Original entry on oeis.org

2, 8, 13, 25, 41, 52, 74, 89, 117, 149, 170, 208, 250, 277, 325, 356, 410, 468, 505, 569, 610, 680, 754, 801, 881, 965, 1018, 1108, 1165, 1261, 1361, 1424, 1530, 1640, 1709, 1825, 1898, 2020, 2146, 2225, 2357, 2440, 2578, 2720, 2809, 2957, 3109, 3204, 3362, 3461
Offset: 1

Views

Author

Paolo Xausa, Mar 20 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Array[#^2 + Ceiling[# / GoldenRatio]^2 &, 100]
  • Python
    from math import isqrt
    def A371381(n): return (n<<1)*(n-1)+1+(q:=n+isqrt(5*n**2)>>1)*(q-(n-1<<1)) # Chai Wah Wu, Mar 21 2024

Formula

a(n) = n^2 + ceiling(n/(1 + sqrt(5))/2)^2 = n^2 + A019446(n)^2.

A295573 Array read by upwards antidiagonals: T(n,k) = nk + floor(phi n) ceiling(phi k) where phi = (1 + sqrt(5))/2.

Original entry on oeis.org

3, 8, 6, 11, 16, 8, 16, 22, 21, 11, 21, 32, 29, 29, 14, 24, 42, 42, 40, 37, 16, 29, 48, 55, 58, 51, 42, 19, 32, 58, 63, 76, 74, 58, 50, 21, 37, 64, 76, 87, 97, 84, 69, 55, 24, 42, 74, 84, 105, 111, 110, 100, 76, 63, 27, 45, 84, 97, 116, 134, 126, 131, 110, 87, 71, 29, 50, 90, 110, 134, 148, 152, 150, 144, 126, 98, 76, 32
Offset: 1

Views

Author

N. J. A. Sloane, Dec 03 2017

Keywords

Comments

This is a hybrid of the Porta-Stolarsky star product (A101858) and the Arnoux product (A101866)

Examples

			The array begins:
3, 6, 8, 11, 14, 16, 19, 21, 24, 27, 29, 32, ...
8, 16, 21, 29, 37, 42, 50, 55, 63, 71, 76, 84, ...
11, 22, 29, 40, 51, 58, 69, 76, 87, 98, 105, 116, ...
16, 32, 42, 58, 74, 84, 100, 110, 126, 142, 152, 168, ...
21, 42, 55, 76, 97, 110, 131, 144, 165, 186, 199, 220, ...
24, 48, 63, 87, 111, 126, 150, 165, 189, 213, 228, 252, ...
29, 58, 76, 105, 134, 152, 181, 199, 228, 257, 275, 304, ...
32, 64, 84, 116, 148, 168, 200, 220, 252, 284, 304, 336, ...
...
		

Crossrefs

Cf. A001622, A101858, A101866, A371382 (main diagonal).

Programs

  • Maple
    T := proc(n, k) local phi;
            phi := (1+sqrt(5))/2 ;
            n*k+floor(n*phi)*ceil(phi*k) ;
    end proc:
    for n from 1 to 12 do
    lprint([seq(T(n-i+1,i),i=1..n)]);
    od: # by antidiagonals
    for n from 1 to 12 do
    lprint([seq(T(n,i),i=1..12)]);
    od: # by rows
  • Mathematica
    A295573[n_, k_] := n*k + Floor[n * GoldenRatio] * Ceiling[k * GoldenRatio];
    Table[A295573[n-k+1,k], {n, 15}, {k, n}] (* Paolo Xausa, Mar 20 2024 *)
Showing 1-2 of 2 results.