A032764
Take list of odd numbers, move left digit of each term to end of previous term.
Original entry on oeis.org
1, 3, 5, 7, 9, 1, 11, 31, 51, 71, 92, 12, 32, 52, 72, 93, 13, 33, 53, 73, 94, 14, 34, 54, 74, 95, 15, 35, 55, 75, 96, 16, 36, 56, 76, 97, 17, 37, 57, 77, 98, 18, 38, 58, 78, 99, 19, 39, 59, 79, 91, 11, 31, 51, 71, 91, 111, 131, 151, 171, 191, 211, 231, 251, 271, 291, 311
Offset: 0
-
a032764 n = a032764_list !! n
a032764_list = 1 : map read (zipWith (++) vs (tail us)) :: [Integer]
where (us,vs) = unzip $ map ((splitAt 1) . show) [1, 3 ..]
-- Reinhard Zumkeller, Oct 10 2013
A290148
a(n) is the integer resulting from the concatenation of the unit digit of n-1 to the digits of n without its own unit digit.
Original entry on oeis.org
0, 1, 2, 3, 4, 5, 6, 7, 8, 91, 1, 11, 21, 31, 41, 51, 61, 71, 81, 92, 2, 12, 22, 32, 42, 52, 62, 72, 82, 93, 3, 13, 23, 33, 43, 53, 63, 73, 83, 94, 4, 14, 24, 34, 44, 54, 64, 74, 84, 95, 5, 15, 25, 35, 45, 55, 65, 75, 85, 96, 6, 16, 26, 36, 46, 56, 66, 76, 86, 97, 7
Offset: 1
For n=46, n-1 is 45, so a(46) is the concatenation of 5 (the unit digit of 45) and 4 (46 without 6), giving 54.
For n=123, n-1 is 122, so a(123) is the concatenation of 2 (the unit digit of 122) and 12 (123 without 3), giving 212.
-
f:= n -> (n-1 mod 10) * 10^ilog10(n) + floor(n/10);
-
a(n) = my(precd = (n-1)%10); if (n < 10, precd, eval(concat(Str(precd), Str(n\10))));
-
def a(n): return 0 if n == 1 else int(str((n-1)%10)+ str(n)[:-1])
print([a(n) for n in range(1, 72)]) # Michael S. Branicky, Feb 22 2025
A385116
Take the natural numbers, erase all occurrences of the digit "0," and shift all remaining digits leftward without changing the position of commas.
Original entry on oeis.org
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 21, 31, 41, 51, 61, 71, 81, 92, 21, 22, 23, 24, 25, 26, 27, 28, 29, 33, 13, 23, 33, 43, 53, 63, 73, 83, 94, 41, 42, 43, 44, 45, 46, 47, 48, 49, 55, 15, 25, 35, 45, 55, 65, 75, 85, 96, 61, 62, 63, 64, 65, 66, 67, 68, 69, 77
Offset: 1
Starting with:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, ...
Erase all zeros:
1, 2, 3, 4, 5, 6, 7, 8, 9, 1_, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2_, 21, ...
Shift all remaining digits to the left:
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 21, 31, 41, 51, 61, 71, 81, 92, 21, 22, ...
-
from itertools import count
s = "".join(map(str,range(1,72))).replace("0","")
a, i, = [], 0
for k in count(1):
if (j:=i+len(str(k))) > len(s): break
a.append(int(s[i:j]))
i = j
print(a)
Showing 1-3 of 3 results.
Comments