login
A275238
a(n) = n*(10^floor(log_10(n)+1) + 1) + (-1)^n.
0
1, 10, 23, 32, 45, 54, 67, 76, 89, 98, 1011, 1110, 1213, 1312, 1415, 1514, 1617, 1716, 1819, 1918, 2021, 2120, 2223, 2322, 2425, 2524, 2627, 2726, 2829, 2928, 3031, 3130, 3233, 3332, 3435, 3534, 3637, 3736, 3839, 3938, 4041, 4140, 4243, 4342, 4445, 4544, 4647, 4746, 4849, 4948, 5051, 5150, 5253, 5352, 5455, 5554
OFFSET
0,2
COMMENTS
Concatenation of n with n+(-1)^n (A004442).
Subsequence of A248378.
Primes in this sequence: 23, 67, 89, 1213, 3637, 4243, 5051, 5657, 6263, 6869, 7879, 8081, 9091, 9293, 9697, 102103, ... (A030458).
Numbers n such that a(n) is prime: 2, 6, 8, 12, 36, 42, 50, 56, 62, 68, 78, 80, 90, 92, 96, 102, 108, 120, 126, 138, ... (A030457).
FORMULA
a(n) = A020338(n) + A033999(n).
a(2k) = A030656(k).
A064834(a(n)) > 0, for n > 0.
a(n) ~ 10*n*10^floor(c*log(n)), where c = 1/log(10) = 0.4342944819... = A002285.
EXAMPLE
a(0) = 0 + 1 = 1;
a(1) = 11 - 1 = 10;
a(2) = 22 + 1 = 23;
a(3) = 33 - 1 = 32;
a(4) = 44 + 1 = 45;
a(5) = 55 - 1 = 54, etc.
or
a(0) = 1 -> concatenation of 0 with 0 + (-1)^0 = 1;
a(1) = 10 -> concatenation of 1 with 1 + (-1)^1 = 0;
a(2) = 23 -> concatenation of 2 with 2 + (-1)^2 = 3;
a(3) = 32 -> concatenation of 3 with 3 + (-1)^3 = 2;
a(4) = 45 -> concatenation of 4 with 4 + (-1)^4 = 5;
a(5) = 54 -> concatenation of 5 with 5 + (-1)^5 = 4, etc.
........................................................
a(2k) = 1, 23, 45, 67, 89, 1011, 1213, 1415, 1617, 1819, ...
MATHEMATICA
Table[n (10^Floor[Log[10, n] + 1] + 1) + (-1)^n, {n, 0, 55}]
PROG
(PARI) a(n) = if(n, n*(10^(logint(n, 10)+1) + 1) + (-1)^n, 1) \\ Charles R Greathouse IV, Jul 21 2016
KEYWORD
nonn,base,easy
AUTHOR
Ilya Gutkovskiy, Jul 21 2016
STATUS
approved