%I #7 Jul 22 2016 11:21:50
%S 1,10,23,32,45,54,67,76,89,98,1011,1110,1213,1312,1415,1514,1617,1716,
%T 1819,1918,2021,2120,2223,2322,2425,2524,2627,2726,2829,2928,3031,
%U 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
%N a(n) = n*(10^floor(log_10(n)+1) + 1) + (-1)^n.
%C Concatenation of n with n+(-1)^n (A004442).
%C Subsequence of A248378.
%C Primes in this sequence: 23, 67, 89, 1213, 3637, 4243, 5051, 5657, 6263, 6869, 7879, 8081, 9091, 9293, 9697, 102103, ... (A030458).
%C 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).
%F a(n) = A020338(n) + A033999(n).
%F a(2k) = A030656(k).
%F A064834(a(n)) > 0, for n > 0.
%F a(n) ~ 10*n*10^floor(c*log(n)), where c = 1/log(10) = 0.4342944819... = A002285.
%e a(0) = 0 + 1 = 1;
%e a(1) = 11 - 1 = 10;
%e a(2) = 22 + 1 = 23;
%e a(3) = 33 - 1 = 32;
%e a(4) = 44 + 1 = 45;
%e a(5) = 55 - 1 = 54, etc.
%e or
%e a(0) = 1 -> concatenation of 0 with 0 + (-1)^0 = 1;
%e a(1) = 10 -> concatenation of 1 with 1 + (-1)^1 = 0;
%e a(2) = 23 -> concatenation of 2 with 2 + (-1)^2 = 3;
%e a(3) = 32 -> concatenation of 3 with 3 + (-1)^3 = 2;
%e a(4) = 45 -> concatenation of 4 with 4 + (-1)^4 = 5;
%e a(5) = 54 -> concatenation of 5 with 5 + (-1)^5 = 4, etc.
%e ........................................................
%e a(2k) = 1, 23, 45, 67, 89, 1011, 1213, 1415, 1617, 1819, ...
%t Table[n (10^Floor[Log[10, n] + 1] + 1) + (-1)^n, {n, 0, 55}]
%o (PARI) a(n) = if(n, n*(10^(logint(n,10)+1) + 1) + (-1)^n, 1) \\ _Charles R Greathouse IV_, Jul 21 2016
%Y Cf. A001704, A002285, A004442, A020338, A030457, A030458, A030656, A033999, A064834, A248378.
%K nonn,base,easy
%O 0,2
%A _Ilya Gutkovskiy_, Jul 21 2016
|