Displaying 1-8 of 8 results found.
page
1
Characteristic function of numbers that are not multiples of 10.
+10
17
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,1).
FORMULA
a(n+10) = a(n);
A033442(n) = Sum_{k=0..n} a(k)*(n-k).
Dirichlet g.f.: (1-1/10^s)*zeta(s). - R. J. Mathar, Feb 19 2011
For the general case: the characteristic function of numbers that are not multiples of m is a(n)=floor((n-1)/m)-floor(n/m)+1, m,n > 0. - Boris Putievskiy, May 08 2013
MATHEMATICA
Table[If[Mod[n, 10]==0, 0, 1], {n, 0, 110}] (* or *) PadRight[{}, 110, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1}] (* Harvey P. Dale, Jun 03 2023 *)
PROG
(Haskell)
a168184 = (1 -) . (0 ^) . (`mod` 10)
a168184_list = cycle [0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
CROSSREFS
Cf. A168185, A145568, A168182, A168181, A109720, A097325, A011558, A166486, A011655, A000035, A010690, A033442.
One of the two successive approximations up to 2^n for 2-adic integer sqrt(-7). This is the 1 (mod 4) case.
+10
7
1, 5, 5, 21, 53, 53, 181, 181, 181, 181, 181, 181, 181, 16565, 49333, 49333, 49333, 49333, 573621, 1622197, 1622197, 1622197, 10010805, 10010805, 10010805, 77119669, 211337397, 479772853, 479772853, 479772853, 2627256501, 6922223797, 15512158389, 15512158389
COMMENTS
a(n) is the unique number k in [1, 2^n] and congruent to 1 (mod 4) such that k^2 + 7 is divisible by 2^(n+1).
The 2-adic integers are very different from p-adic ones where p is an odd prime. For example, provided that there is at least one solution, the number of solutions to x^n = a over p-adic integers is gcd(n, p-1) for odd primes p and gcd(n, 2) for p = 2. For odd primes p, x^2 = a is solvable iff a is a quadratic residue modulo p, while for p = 2 it's solvable iff a == 1 (mod 8). If gcd(n, p-1) > 1 and gcd(a, p) = 1, then the solutions to x^n = a differ starting at the rightmost digit for odd primes p, while for p = 2 they differ starting at the next-to-rightmost digit. As a result, the formulas and the program here are different from those in other entries related to p-adic integers.
FORMULA
a(2) = 1; for n >= 3, a(n) = a(n-1) if a(n-1)^2 + 7 is divisible by 2^(n+1), otherwise a(n-1) + 2^(n-1).
a(n) = Sum_{i=0..n-1} A318962(i)*2^i.
EXAMPLE
The unique number k in [1, 4] and congruent to 1 modulo 4 such that k^2 + 7 is divisible by 8 is 1, so a(2) = 1.
a(2)^2 + 7 = 8 which is not divisible by 16, so a(3) = a(2) + 2^2 = 5.
a(3)^2 + 7 = 32 which is divisible by 32, so a(4) = a(3) = 5.
a(4)^2 + 7 = 32 which is divisible by 64, so a(5) = a(4) + 2^4 = 21.
a(5)^2 + 7 = 448 which is divisible by 128, so a(6) = a(5) + 2^5 = 53.
...
PROG
(PARI) a(n) = truncate(-sqrt(-7+O(2^(n+1))))
CROSSREFS
Expansions of p-adic integers:
this sequence, A318961 (2-adic, sqrt(-7));
Also expansions of 10-adic integers:
One of the two successive approximations up to 2^n for 2-adic integer sqrt(-7). This is the 3 (mod 4) case.
+10
7
3, 3, 11, 11, 11, 75, 75, 331, 843, 1867, 3915, 8011, 16203, 16203, 16203, 81739, 212811, 474955, 474955, 474955, 2572107, 6766411, 6766411, 23543627, 57098059, 57098059, 57098059, 57098059, 593968971, 1667710795, 1667710795, 1667710795, 1667710795, 18847579979
COMMENTS
a(n) is the unique number k in [1, 2^n] and congruent to 3 (mod 4) such that k^2 + 7 is divisible by 2^(n+1).
The 2-adic integers are very different from p-adic ones where p is an odd prime. For example, provided that there is at least one solution, the number of solutions to x^n = a over p-adic integers is gcd(n, p-1) for odd primes p and gcd(n, 2) for p = 2. For odd primes p, x^2 = a is solvable iff a is a quadratic residue modulo p, while for p = 2 it's solvable iff a == 1 (mod 8). If gcd(n, p-1) > 1 and gcd(a, p) = 1, then the solutions to x^n = a differ starting at the rightmost digit for odd primes p, while for p = 2 they differ starting at the next-to-rightmost digit. As a result, the formulas and the program here are different from those in other entries related to p-adic integers.
FORMULA
a(2) = 3; for n >= 3, a(n) = a(n-1) if a(n-1)^2 + 7 is divisible by 2^(n+1), otherwise a(n-1) + 2^(n-1).
a(n) = Sum_{i=0..n-1} A318963(i)*2^i.
EXAMPLE
The unique number k in [1, 4] and congruent to 3 modulo 4 such that k^2 + 7 is divisible by 8 is 3, so a(2) = 3.
a(2)^2 + 7 = 16 which is divisible by 16, so a(3) = a(2) = 3.
a(3)^2 + 7 = 16 which is not divisible by 32, so a(4) = a(3) + 2^3 = 11.
a(4)^2 + 7 = 128 which is divisible by 64, so a(5) = a(4) = 11.
a(5)^2 + 7 = 128 which is divisible by 128, so a(6) = a(5) = 11.
...
PROG
(PARI) a(n) = if(n==2, 3, truncate(sqrt(-7+O(2^(n+1)))))
CROSSREFS
Expansions of p-adic integers:
A318960, this sequence (2-adic, sqrt(-7));
Also expansions of 10-adic integers:
1, 9, 81, 29, 61, 49, 41, 69, 21, 89, 1, 9, 81, 29, 61, 49, 41, 69, 21, 89, 1, 9, 81, 29, 61, 49, 41, 69, 21, 89, 1, 9, 81, 29, 61, 49, 41, 69, 21, 89, 1, 9, 81, 29, 61, 49, 41, 69, 21, 89, 1, 9, 81, 29, 61, 49, 41, 69, 21, 89
MATHEMATICA
Flatten[Prepend[FromDigits[Take[IntegerDigits[#], -2]]&/@(9^Range[2, 60]), {1, 9}]] (* Harvey P. Dale, Jan 22 2011 *)
Decimal expansion of (3+sqrt(13))/6.
+10
2
1, 1, 0, 0, 9, 2, 5, 2, 1, 2, 5, 7, 7, 3, 3, 1, 5, 4, 8, 8, 5, 3, 2, 0, 3, 5, 4, 4, 5, 7, 8, 4, 1, 5, 9, 9, 1, 0, 4, 1, 8, 8, 2, 7, 6, 2, 3, 0, 7, 5, 4, 1, 0, 3, 5, 4, 5, 1, 7, 4, 2, 1, 7, 6, 0, 3, 7, 8, 6, 1, 1, 5, 8, 0, 4, 8, 8, 3, 5, 0, 7, 4, 2, 0, 0, 7, 6, 9, 8, 4, 7, 0, 0, 3, 0, 8, 1, 7, 8, 6, 2, 7, 8, 9, 1
COMMENTS
Continued fraction expansion of (3+sqrt(13))/6 is A010690.
EXAMPLE
(3+sqrt(13))/6 = 1.10092521257733154885...
4, 11, 19, 41, 79, 161, 319, 641, 1279, 2561, 5119, 10241, 20479, 40961, 81919, 163841, 327679, 655361, 1310719, 2621441, 5242879, 10485761, 20971519, 41943041, 83886079, 167772161, 335544319, 671088641, 1342177279, 2684354561, 5368709119, 10737418241, 21474836479
FORMULA
a(n+2) - a(n) = a(n+1) + a(n) = 15*2^n, n >= 0.
a(n) - 2*a(n-1) = period 2: repeat [3, -3], n > 0, a(0)=4, a(1)=11.
a(n+1) = 10* A051049(n) + period 2: repeat [1, 9].
a(n) = 12*2^n - A321483(n), n >= 0.
a(n) = 2^(n+2) + 3* A001045(n), n >= 0.
G.f.: (4 + 7*x) / ((1 + x)*(1 - 2*x)).
a(n) = a(n-1) + 2*a(n-2) for n > 1. (End)
MATHEMATICA
a[n_] := 5*2^n - (-1)^n; Array[a, 30, 0] (* Amiram Eldar, Dec 03 2018 *)
PROG
(PARI) Vec((4 + 7*x) / ((1 + x)*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Dec 04 2018
(Python) for n in range(0, 30): print(5*2**n - (-1)**n) # Stefano Spezia, Dec 05 2018
Array T(n,k) read by antidiagonals: T(n,2k)=1, T(n,2k+1)=n, n>=2, k>=0.
+10
1
1, 1, 2, 1, 3, 1, 1, 4, 1, 2, 1, 5, 1, 3, 1, 1, 6, 1, 4, 1, 2, 1, 7, 1, 5, 1, 3, 1, 1, 8, 1, 6, 1, 4, 1, 2, 1, 9, 1, 7, 1, 5, 1, 3, 1, 1, 10, 1, 8, 1, 6, 1, 4, 1, 2, 1, 11, 1, 9, 1, 7, 1, 5, 1, 3, 1, 1, 12, 1, 10, 1, 8, 1, 6, 1, 4, 1, 2, 1, 13, 1, 11, 1, 9, 1, 7, 1, 5, 1, 3, 1, 1, 14, 1, 12, 1, 10, 1, 8, 1, 6, 1, 4, 1, 2
COMMENTS
One may define another array B(n,0) = -1, B(n,k) = T(n,k-1) + 2*B(n,k-1), n>=2, which also starts in columns k>=0, as follows:
-1, -1, 0, 1, 4, 9, 20, 41, 84, 169, 340, 681, 1364 ...: A084639;
-1, -1, 1, 3, 9, 19, 41, 83, 169, 339, 681, 1363, 2729;
-1, -1, 2, 5, 14, 29, 62, 125, 254, 509, 1022, 2045, 4094;
-1, -1, 3, 7, 19, 39, 83, 167, 339, 679, 1363, 2727, 5459 ...: - A173114;
B(n,k) = (n-1)* A001045(k) - T(n,k).
First differences are B(n,k+1) - B(n,k) = (n-1)* A001045(k).
FORMULA
T(n, k) = (1/2)*((n+3) - (n+1)*(-1)^k).
Sum_{k=0..n} T(n-k, k) = A024206(n).
Sum_{k=0..floor((n+2)/2)} T(n-2*k+2, k) = (1/16)*(2*n^2 4*n -5*(1 +(-1)^n) + 4*sin(n*Pi/2)) (diagonal sums).
EXAMPLE
The array T(n,k) starts in row n=2 with columns k>=0 as:
1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2 ... A000034;
1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3 ... A010684;
1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4 ... A010685;
1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5 ... A010686;
1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6 ... A010687;
1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7 ... A010688;
1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8 ... A010689;
1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9 ... A010690;
1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10 ... A010691.
Antidiagonal triangle begins as:
1;
1, 2;
1, 3, 1;
1, 4, 1, 2;
1, 5, 1, 3, 1;
1, 6, 1, 4, 1, 2;
1, 7, 1, 5, 1, 3, 1;
1, 8, 1, 6, 1, 4, 1, 2;
1, 9, 1, 7, 1, 5, 1, 3, 1;
1, 10, 1, 8, 1, 6, 1, 4, 1, 2;
1, 11, 1, 9, 1, 7, 1, 5, 1, 3, 1;
1, 12, 1, 10, 1, 8, 1, 6, 1, 4, 1, 2;
1, 13, 1, 11, 1, 9, 1, 7, 1, 5, 1, 3, 1;
1, 14, 1, 12, 1, 10, 1, 8, 1, 6, 1, 4, 1, 2;
MATHEMATICA
T[n_, k_]:= (1/2)*((n+3) - (n+1)*(-1)^k);
Table[T[n-k, k], {n, 2, 17}, {k, 2, n}]//Flatten (* G. C. Greubel, Dec 03 2021 *)
PROG
(Sage) flatten([[(1/2)*((n-k+3) - (n-k+1)*(-1)^k) for k in (2..n)] for n in (2..17)]) # G. C. Greubel, Dec 03 2021
a(n) = gcd(n! / floor(n/2)!^2, 3^n).
+10
1
1, 1, 1, 3, 3, 3, 1, 1, 1, 9, 9, 9, 3, 3, 3, 9, 9, 9, 1, 1, 1, 3, 3, 3, 1, 1, 1, 27, 27, 27, 9, 9, 9, 27, 27, 27, 3, 3, 3, 9, 9, 9, 3, 3, 3, 27, 27, 27, 9, 9, 9, 27, 27, 27, 1, 1, 1, 3, 3, 3, 1, 1, 1, 9, 9, 9, 3, 3, 3, 9, 9, 9, 1, 1, 1, 3, 3, 3, 1, 1, 1
FORMULA
a(3*n) = a(3*n+1) = a(3*n+2) = A010684(n)*a(n) for n > 1 with a(0) = a(1) = a(2) = 1.
a(9*n+3) = a(9*n+4) = a(9*n+5) = 3*a(n).
a(9*n) = a(9*n+1) = a(9*n+2) = a(9*n+6) = a(9*n+7) = a(9*n+8) = A010690(n)*a(n). (End)
MAPLE
A190906 := n -> igcd(n!/iquo(n, 2)!^2, 3^n): seq( A190906(n), n=0..80);
MATHEMATICA
sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/f!]; a[n_] := GCD[sf[n], 3^n]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Jul 29 2013 *)
Search completed in 0.011 seconds
|