[go: up one dir, main page]

login
Search: a010690 -id:a010690
     Sort: relevance | references | number | modified | created      Format: long | short | data
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
OFFSET
0,1
FORMULA
a(n+10) = a(n);
a(n) = A000007(A010879(n));
a(A067251(n)) = 1; a(A008592(n)) = 0;
not the same as A168046: a(n)=A168046 for n<=100;
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]
-- Reinhard Zumkeller, Oct 10 2012
(PARI) a(n)=n%10>0 \\ Charles R Greathouse IV, Sep 24 2015
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Nov 30 2009
STATUS
approved
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
OFFSET
2,2
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.
LINKS
Jianing Song, Table of n, a(n) for n = 2..999 (offset corrected by Jianing Song)
G. P. Michon, Introduction to p-adic integers, Numericana.
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) = 2^n - A318961(n).
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
Cf. A318962.
Expansions of p-adic integers:
this sequence, A318961 (2-adic, sqrt(-7));
A268924, A271222 (3-adic, sqrt(-2));
A268922, A269590 (5-adic, sqrt(-4));
A048898, A048899 (5-adic, sqrt(-1));
A290567 (5-adic, 2^(1/3));
A290568 (5-adic, 3^(1/3));
A290800, A290802 (7-adic, sqrt(-6));
A290806, A290809 (7-adic, sqrt(-5));
A290803, A290804 (7-adic, sqrt(-3));
A210852, A212153 (7-adic, (1+sqrt(-3))/2);
A290557, A290559 (7-adic, sqrt(2));
A286840, A286841 (13-adic, sqrt(-1));
A286877, A286878 (17-adic, sqrt(-1)).
Also expansions of 10-adic integers:
A007185, A010690 (nontrivial roots to x^2-x);
A216092, A216093, A224473, A224474 (nontrivial roots to x^3-x).
KEYWORD
nonn
AUTHOR
Jianing Song, Sep 06 2018
EXTENSIONS
Offset corrected by Jianing Song, Aug 28 2019
STATUS
approved
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
OFFSET
2,1
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.
LINKS
Jianing Song, Table of n, a(n) for n = 2..999 (offset corrected by Jianing Song)
G. P. Michon, Introduction to p-adic integers, Numericana.
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) = 2^n - A318960(n).
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
Cf. A318963.
Expansions of p-adic integers:
A318960, this sequence (2-adic, sqrt(-7));
A268924, A271222 (3-adic, sqrt(-2));
A268922, A269590 (5-adic, sqrt(-4));
A048898, A048899 (5-adic, sqrt(-1));
A290567 (5-adic, 2^(1/3));
A290568 (5-adic, 3^(1/3));
A290800, A290802 (7-adic, sqrt(-6));
A290806, A290809 (7-adic, sqrt(-5));
A290803, A290804 (7-adic, sqrt(-3));
A210852, A212153 (7-adic, (1+sqrt(-3))/2);
A290557, A290559 (7-adic, sqrt(2));
A286840, A286841 (13-adic, sqrt(-1));
A286877, A286878 (17-adic, sqrt(-1)).
Also expansions of 10-adic integers:
A007185, A010690 (nontrivial roots to x^2-x);
A216092, A216093, A224473, A224474 (nontrivial roots to x^3-x).
KEYWORD
nonn
AUTHOR
Jianing Song, Sep 06 2018
EXTENSIONS
Offset corrected by Jianing Song, Aug 28 2019
STATUS
approved
Final 2 digits of 9^n.
+10
2
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
OFFSET
0,2
COMMENTS
Period is 10, i.e., a(n+10) = a(n). - Martin Renner, Jun 11 2020
FORMULA
a(n) = 9^n mod 100. - Martin Renner, Jun 11 2020
MAPLE
seq(9^n mod 100, n=0..80); # Martin Renner, Jun 11 2020
MATHEMATICA
Flatten[Prepend[FromDigits[Take[IntegerDigits[#], -2]]&/@(9^Range[2, 60]), {1, 9}]] (* Harvey P. Dale, Jan 22 2011 *)
PowerMod[9, Range[0, 80], 100] (* Vincenzo Librandi, Aug 16 2016 *)
PROG
(Magma) [Modexp(9, n, 100): n in [0..110]]; // Vincenzo Librandi, Aug 16 2016
(PARI) a(n) = lift(Mod(9, 100)^n); \\ Michel Marcus, Aug 16 2016
CROSSREFS
Cf. A001019 (9^n), A010690 (final digit of 9^n).
KEYWORD
nonn,base,easy
STATUS
approved
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
OFFSET
1,5
COMMENTS
Continued fraction expansion of (3+sqrt(13))/6 is A010690.
LINKS
EXAMPLE
(3+sqrt(13))/6 = 1.10092521257733154885...
CROSSREFS
Cf. A010470 (decimal expansion of sqrt(13)), A010690 (repeat 1, 9).
KEYWORD
cons,nonn
AUTHOR
Klaus Brockhaus, Apr 06 2010
STATUS
approved
a(n) = 5*2^n - (-1)^n.
+10
2
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
OFFSET
0,1
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.
a(n) == A070366(n+4) (mod 9).
From Colin Barker, Dec 04 2018: (Start)
G.f.: (4 + 7*x) / ((1 + x)*(1 - 2*x)).
a(n) = a(n-1) + 2*a(n-2) for n > 1. (End)
E.g.f.: exp(-x)*(5*exp(3*x) - 1). - Elmo R. Oliveira, Aug 17 2024
MAPLE
[5*2^n-(-1)^n$n=0..30]; # Muniru A Asiru, Dec 05 2018
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
(GAP) List([0..30], n->5*2^n-(-1)^n); # Muniru A Asiru, Dec 05 2018
(Python) for n in range(0, 30): print(5*2**n - (-1)**n) # Stefano Spezia, Dec 05 2018
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Dec 03 2018
STATUS
approved
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
OFFSET
2,3
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
From G. C. Greubel, Dec 03 2021: (Start)
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).
T(2*n-2, n) = A093178(n). (End)
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
KEYWORD
nonn,tabl,easy
AUTHOR
Paul Curtz, Feb 14 2010
STATUS
approved
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
OFFSET
0,4
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = gcd(A056040(n), 3^n).
a(n) <= n. - Charles R Greathouse IV, Jun 30 2011
From Johannes W. Meijer, Jun 30 2011: (Start)
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 *)
PROG
(PARI) a(n)=gcd(n!/(n\2)!^2, 3^n) \\ Charles R Greathouse IV, Jun 30 2011
(PARI) a(n)=my(s); while(n\=3, s+=n%2); 3^s \\ Charles R Greathouse IV, Jun 30 2011
CROSSREFS
Cf. A060632.
KEYWORD
nonn,easy,look,hear
AUTHOR
Peter Luschny, Jun 30 2011
STATUS
approved

Search completed in 0.011 seconds