A246700 Table read by rows: trajectories under iteration of Carmichael's lambda function (cf. A002322).
1, 2, 1, 3, 2, 1, 4, 2, 1, 5, 4, 2, 1, 6, 2, 1, 7, 6, 2, 1, 8, 2, 1, 9, 6, 2, 1, 10, 4, 2, 1, 11, 10, 4, 2, 1, 12, 2, 1, 13, 12, 2, 1, 14, 6, 2, 1, 15, 4, 2, 1, 16, 4, 2, 1, 17, 16, 4, 2, 1, 18, 6, 2, 1, 19, 18, 6, 2, 1, 20, 4, 2, 1, 21, 6, 2, 1, 22, 10, 4, 2, 1
Offset: 1
Examples
. | 1 | 1 | 13 | 13-12-2-1 | 25 | 25-20-4-2-1 . | 2 | 2-1 | 14 | 14-6-2-1 | 26 | 26-12-2-1 . | 3 | 3-2-1 | 15 | 15-4-2-1 | 27 | 27-18-6-2-1 . | 4 | 4-2-1 | 16 | 16-4-2-1 | 28 | 28-6-2-1 . | 5 | 5-4-2-1 | 17 | 17-16-4-2-1 | 29 | 29-28-6-2-1 . | 6 | 6-2-1 | 18 | 18-6-2-1 | 30 | 30-4-2-1 . | 7 | 7-6-2-1 | 19 | 19-18-6-2-1 | 31 | 31-30-4-2-1 . | 8 | 8-2-1 | 20 | 20-4-2-1 | 32 | 32-8-2-1 . | 9 | 9-6-2-1 | 21 | 21-6-2-1 | 33 | 33-10-4-2-1 . | 10 | 10-4-2-1 | 22 | 22-10-4-2-1 | 34 | 34-16-4-2-1 . | 11 | 11-10-4-2-1 | 23 | 23-22-10-4-2-1 | 35 | 35-12-2-1 . | 12 | 12-2-1 | 24 | 24-2-1 | 36 | 36-6-2-1 .
Links
- Reinhard Zumkeller, Rows n = 1..1001 of triangle, flattened
Programs
-
Haskell
import Data.List (genericIndex) a246700 n k = genericIndex a246700_tabf (n - 1) !! (k-1) a246700_row n = genericIndex a246700_tabf (n - 1) a246700_tabf = [1] : f 2 where f x = (x : a246700_row (a002322 x)) : f (x + 1)
-
Mathematica
Array[Most[FixedPointList[CarmichaelLambda, #]] &, 25] (* Paolo Xausa, Aug 17 2024 *)
Comments