A386014 Distinct values occurring in first differences of A030655(n), listed in order of first appearance.
22, 832, 202, 89302, 2002, 8993002, 20002, 899930002, 200002, 89999300002, 2000002, 8999993000002, 20000002, 899999930000002, 200000002, 89999999300000002, 2000000002, 8999999993000000002, 20000000002, 899999999930000000002, 200000000002, 89999999999300000000002, 2000000000002
Offset: 1
Examples
At t = j(3) = 499, difference A030655(t+1) - A030655(t) = 9991000 - 997998 = 8993002 which is term a(6).
Links
- Index entries for linear recurrences with constant coefficients, signature (1,110,-110,-1000,1000).
Programs
-
Maple
a := proc(n) if type(n, even) then k := n/2; return 9*100^k - 7*10^k + 2; else k := (n + 1)/2; return 2*(10^k + 1); end if; end proc: seq(a(n), n=1..12);
-
Mathematica
a[n_] := Which[ EvenQ[n], Module[{k = n/2}, 9*100^k - 7*10^k + 2], OddQ[n], Module[{k = (n + 1)/2}, 2*(10^k + 1)] ]; Table[a[n], {n, 1, 12}]
-
PARI
a(n) = if(n%2==1, 2*10^((n+1)/2)+2, 9*10^n - 7*10^(n/2) + 2) \\ David A. Corneth, Jul 17 2025
-
Python
def a(n): k = (n + 1)//2 if n % 2 == 0: return 9 * 100**k - 7 * 10**k + 2 else: return 2 * (10**k + 1)
Formula
a(n) = 2*(10^k + 1) for odd n, where k = (n+1)/2.
a(n) = 9*100^k - 7*10^k + 2 for even n, where k = n/2.
Extensions
More terms from Michel Marcus, Jul 16 2025
More terms from David A. Corneth, Jul 17 2025
Comments