Displaying 1-2 of 2 results found.
page
1
Inverse permutation to A194061; every positive integer occurs exactly once.
+0
2
1, 2, 3, 4, 5, 7, 8, 6, 11, 12, 9, 16, 17, 13, 10, 22, 23, 18, 14, 29, 30, 24, 19, 15, 37, 38, 31, 25, 20, 46, 47, 39, 32, 26, 21, 56, 57, 48, 40, 33, 27, 58, 49, 41, 34, 28, 59, 50, 42, 35, 60, 51, 43, 36, 61, 52, 44, 62, 53, 45, 63, 54
Fractal sequence: count up to successive integers twice.
+0
14
1, 1, 1, 2, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5
COMMENTS
Fractal - deleting the first occurrence of each integer leaves the original sequence. Also, deleting all the 1's leaves the original sequence plus 1. New values occur at square indices. 1's occur at indices m^2+1 and m^2+m+1. Ordinal transform of A122196.
Triangle read by rows formed from antidiagonals of triangle A002260.
The row sums equal A008805(n-1) and the antidiagonal sums equal A211534(n+5). (End)
FORMULA
a(n) = ((n-1) mod (t+1)) + 1, where t = floor((sqrt(4*n-3)-1)/2). -
T(n, k) = k for n >= 1 and 1 <= k <= (n+1)/2; T(n, k) = 0 elsewhere.
a(n) = n - floor(sqrt(n) + 1/2)*floor(sqrt(n-1)). - Ridouane Oudra, Jun 08 2020
EXAMPLE
The first few rows of the sequence a(n) as a triangle T(n, k):
n/k 1 2 3
1 1
2 1
3 1, 2
4 1, 2
5 1, 2, 3
6 1, 2, 3
MAPLE
a := proc(n) local t: t := floor((sqrt(4*n-3)-1)/2): (n-1) mod (t+1) + 1 end: seq(a(n), n=1..105); # End first program
T := proc(n, k): if n < 1 then return(0) elif k < 1 or k> floor((n+1)/2) then return(0) else k fi: end: seq(seq(T(n, k), k=1..floor((n+1)/2)), n=1..19); # End second program. (End)
MATHEMATICA
With[{c=Table[Range[n], {n, 10}]}, Flatten[Riffle[c, c]]] (* Harvey P. Dale, Apr 19 2013 *)
PROG
(Haskell)
import Data.List (transpose, genericIndex)
a122197 n k = genericIndex (a122197_row n) (k - 1)
a122197_row n = genericIndex a122197_tabf (n - 1)
a122197_tabf = concat $ transpose [a002260_tabl, a002260_tabl]
a122197_list = concat a122197_tabf
Search completed in 0.005 seconds
|