A218036 a(n) = (n+1) + (n+3/2)*H(n) - (H(n)^3)/2, where H(n) = A002024(n).
4, 6, 9, 8, 12, 16, 10, 15, 20, 25, 12, 18, 24, 30, 36, 14, 21, 28, 35, 42, 49, 16, 24, 32, 40, 48, 56, 64, 18, 27, 36, 45, 54, 63, 72, 81, 20, 30, 40, 50, 60, 70, 80, 90, 100, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144
Offset: 1
Examples
Sequence can be seen as a triangle that begins: 4; 6, 9; 8, 12, 16; 10, 15, 20, 25; 12, 18, 24, 30, 36; 14, 21, 28, 35, 42, 49; 16, 24, 32, 40, 48, 56, 64; ...
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..3655 (Rows n=1..85 of triangle, flattened).
- Blake Ralston, Elemental Complete Composite Number Generators, The Fibonacci Quarterly, Volume 23, Number 2, May 1985, pp. 149-150.
Crossrefs
Cf. A002024.
Programs
-
Magma
/* As triangle */ [[n*k +n + k+1: k in [1..n]]: n in [1.. 20]]; // Vincenzo Librandi, Jan 27 2025
-
Mathematica
Table[(k+1)*(n+1),{n,1,11},{k,1,n}]//Flatten (* Stefano Spezia, Nov 23 2019 *)
-
Python
from math import isqrt def A218036(n): return ((m:=isqrt((k:=n<<1)<<2)+1>>1)*(k+3-m**2)>>1)+n+1 # Chai Wah Wu, Jun 14 2025
Formula
As a triangle: T(n, k) = (k + 1)*(n + 1) with 1 <= k <= n. - Stefano Spezia, Nov 23 2019
Comments