[go: up one dir, main page]

login
Search: a017377 -id:a017377
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = 3/2 + 5*n - 5*(-1)^n/2.
+0
1
9, 9, 19, 19, 29, 29, 39, 39, 49, 49, 59, 59, 69, 69, 79, 79, 89, 89, 99, 99, 109, 109, 119, 119, 129, 129, 139, 139, 149, 149, 159, 159, 169, 169, 179, 179, 189, 189, 199, 199, 209, 209, 219, 219, 229, 229, 239, 239, 249, 249, 259, 259, 269, 269, 279, 279, 289
OFFSET
1,1
FORMULA
a(n) = 10*n - a(n-1) - 2, n > 1.
a(n+1) = A017377(floor(n/2)). - R. J. Mathar, Jan 05 2011
G.f.: x*(9+x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Jan 05 2011
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {9, 9, 19}, 60] (* Vincenzo Librandi, Mar 02 2012 *)
Table[3/2+5n-(5(-1)^n)/2, {n, 60}] (* or *) nxt[{n_, a_}]:={n+1, 10(n+1)-a-2}; NestList[nxt, {1, 9}, 60][[;; , 2]] (* Harvey P. Dale, Nov 04 2024 *)
PROG
(Magma) I:=[9, 9, 19]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..60]]; // Vincenzo Librandi, Mar 02 2012
(PARI) for(n=1, 60, print1(3/2+5*n-5*(-1)^n/2", ")); \\ Vincenzo Librandi, Mar 02 2012
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 25 2009
EXTENSIONS
Definition rewritten by R. J. Mathar, Jan 05 2011
STATUS
approved
a(n) is the number of divisors of A346950(n) ending with 3.
+0
3
1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 4, 2, 2, 4, 2, 2
OFFSET
1,2
COMMENTS
a(n) = 1 if A346950(n) = k^2 where k is either a prime ending with 3 or the product of a prime ending with 7 and a prime ending with 9. - Robert Israel, Nov 03 2024
LINKS
EXAMPLE
a(17) = 4 since there are 4 divisors of A346950(17) = 429 ending with 3: 3, 13, 33 and 143.
MAPLE
N:= 10000: # for a(1) .. a(M) where the last term of A346950 less than N is A346950(M)
S:= {}:
for n from 3 to floor(sqrt(N)) by 10 do
S:= S union map(`*`, {seq(i, i= n .. floor(N/n), 10)}, n)
od:
S:= sort(convert(S, list)):
map(t -> nops(select(t -> t mod 10 = 3, numtheory:-divisors(t))), S); # Robert Israel, Nov 03 2024
MATHEMATICA
b={}; For[n=0, n<=450, n++, For[k=0, k<=n, k++, If[Mod[10*n+9, 10*k+3]==0 && Mod[(10*n+9)/(10*k+3), 10]==3 && 10*n+9>Max[b], AppendTo[b, 10*n+9]]]]; (* A346950 *) a={}; For[i =1, i<=Length[b], i++, AppendTo[a, Length[Drop[Select[Divisors[Part[b, i]], (Mod[#, 10]==3&)]]]]]; a
PROG
(Python)
from sympy import divisors
def f(n): return sum(d%10 == 3 for d in divisors(n)[1:-1])
def A346950upto(lim): return sorted(set(a*b for a in range(3, lim//3+1, 10) for b in range(a, lim//a+1, 10)))
print(list(map(f, A346950upto(2129)))) # Michael S. Branicky, Aug 11 2021
CROSSREFS
Cf. A000005, A017377, A346388 (ending with 5), A346389 (ending with 6), A346950, A346951, A346952.
KEYWORD
nonn,base
AUTHOR
Stefano Spezia, Aug 08 2021
STATUS
approved
Numbers whose last digit is a square.
+0
1
0, 1, 4, 9, 10, 11, 14, 19, 20, 21, 24, 29, 30, 31, 34, 39, 40, 41, 44, 49, 50, 51, 54, 59, 60, 61, 64, 69, 70, 71, 74, 79, 80, 81, 84, 89, 90, 91, 94, 99, 100, 101, 104, 109, 110, 111, 114, 119, 120, 121, 124, 129, 130, 131, 134, 139, 140, 141, 144, 149
OFFSET
1,3
COMMENTS
Numbers ending in 0, 1, 4 and 9.
Union of A008592, A017281, A017317 and A017377. - Hurt
None of these numbers are prime in Z[phi] (where phi = 1/2 + sqrt(5)/2 is the golden ratio), since the numbers in this sequence that are prime in Z can be expressed in the form (a - b sqrt(5))(a + b sqrt(5)). - Alonso del Arte, Dec 30 2015
Union of A197652 and A016897. - Wesley Ivan Hurt, Dec 31 2015
Union of A146763 and A090771. - Wesley Ivan Hurt, Jan 01 2016
FORMULA
G.f.: x^2*(1 + 3*x + 5*x^2 + x^3)/((x - 1)^2*(1 + x + x^2 + x^3)).
a(n) = a(n - 1) + (n - 4) - a(n - 5) for n > 5.
a(n) = (10n - 11 + (-1)^n + (4 + 2(-1)^n) * (-1)^((2n - 1 + (-1)^n)/4))/4.
a(n+1) - a(n) = A091084(n+1) for n>0.
Sum_{n>=2} (-1)^n/a(n) = (14*sqrt(5)*arccoth(sqrt(5)) - 2*Pi*sqrt(1-2/sqrt(5)) + 16*log(2) + 5*log(5))/40. - Amiram Eldar, Jul 30 2024
MAPLE
A266297:=n->(10*n-11+(-1)^n+(4+2*(-1)^n)*(-1)^((2*n-1+(-1)^n)/4))/4: seq(A266297(n), n=1..100);
MATHEMATICA
Table[(10 n - 11 + (-1)^n + (4 + 2 (-1)^n)*(-1)^((2 n - 1 + (-1)^n)/4))/4, {n, 50}] (* G. C. Greubel, Dec 27 2015 *)
LinearRecurrence[{1, 0, 0, 1, -1}, {0, 1, 4, 9, 10}, 60] (* Vincenzo Librandi, Dec 27 2015 *)
CoefficientList[Series[x*(1 + 3*x + 5*x^2 + x^3)/((x - 1)^2*(1 + x + x^2 + x^3)), {x, 0, 100}], x] (* Wesley Ivan Hurt, Dec 30 2015 *)
Flatten[Table[10n + {0, 1, 4, 9}, {n, 0, 19}]] (* Alonso del Arte, Dec 30 2015 *)
Select[Range[0, 150], MemberQ[{0, 1, 4, 9}, Mod[#, 10]]&] (* Harvey P. Dale, Jul 30 2019 *)
PROG
(Magma) [(10*n-11+(-1)^n+(4+2*(-1)^n)*(-1)^((2*n-1+(-1)^n) div 4))/4: n in [1..60]]; // Vincenzo Librandi, Dec 27 2015
(PARI) is(n) = issquare(n%10); \\ Altug Alkan, Dec 29 2015
KEYWORD
nonn,easy,base
AUTHOR
Wesley Ivan Hurt, Dec 26 2015
STATUS
approved
Numbers whose last digit is composite.
+0
3
4, 6, 8, 9, 14, 16, 18, 19, 24, 26, 28, 29, 34, 36, 38, 39, 44, 46, 48, 49, 54, 56, 58, 59, 64, 66, 68, 69, 74, 76, 78, 79, 84, 86, 88, 89, 94, 96, 98, 99, 104, 106, 108, 109, 114, 116, 118, 119, 124, 126, 128, 129, 134, 136, 138, 139, 144, 146, 148, 149
OFFSET
1,1
COMMENTS
Numbers ending in 4, 6, 8 or 9.
Union of A017317, A017341, A017365 and A017377.
Subsequence of A118951 (numbers containing at least one composite digit).
Complement of (A197652 Union A260181).
FORMULA
G.f.: x*(4+2*x+2*x^2+x^3+x^4)/((x-1)^2*(1+x+x^2+x^3)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (5*n+1-(-1)^n+(3+(-1)^n)*(-1)^((2*n-3-(-1)^n)/4)/2)/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(10-2*sqrt(5))*Pi - sqrt(5)*arccoth(3/sqrt(5)) - 4*log(2))/20. - Amiram Eldar, Jul 30 2024
MAPLE
A262389:=n->(5*n+1-(-1)^n+(3+(-1)^n)*(-1)^((2*n-3-(-1)^n)/4)/2)/2: seq(A262389(n), n=1..100);
MATHEMATICA
Table[(5n+1-(-1)^n+(3+(-1)^n)*(-1)^((2n-3-(-1)^n)/4)/2)/2, {n, 100}]
LinearRecurrence[{1, 0, 0, 1, -1}, {4, 6, 8, 9, 14}, 80] (* Vincenzo Librandi, Sep 21 2015 *)
CoefficientList[Series[(4 + 2*x + 2*x^2 + x^3 + x^4)/((x - 1)^2*(1 + x + x^2 + x^3)), {x, 0, 80}], x] (* Wesley Ivan Hurt, Sep 21 2015 *)
Select[Range[200], CompositeQ[Mod[#, 10]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 21 2019 *)
PROG
(Magma) [(5*n+1-(-1)^n+(3+(-1)^n)*(-1)^((2*n-3-(-1)^n) div 4) div 2) div 2: n in [1..70]]; // Vincenzo Librandi, Sep 21 2015
CROSSREFS
Cf. A118951, A197652, A260181 (last digit is prime).
KEYWORD
nonn,base,easy
AUTHOR
Wesley Ivan Hurt, Sep 21 2015
EXTENSIONS
Name edited by Jon E. Schoenfield, Feb 15 2018
STATUS
approved
Numbers k such that k and k+1 both have an equal number of even and odd digits.
+0
2
29, 49, 69, 89, 1009, 1029, 1049, 1069, 1089, 1209, 1229, 1249, 1269, 1289, 1409, 1429, 1449, 1469, 1489, 1609, 1629, 1649, 1669, 1689, 1809, 1829, 1849, 1869, 1889, 2109, 2129, 2149, 2169, 2189, 2309, 2329, 2349, 2369, 2389, 2509, 2529, 2549, 2569, 2589, 2709
OFFSET
1,1
COMMENTS
The terms are of the form 100*m + j, where m is either 0 or a term of A227870 and j is in {29, 49, 69, 89} if m = 0 or in {9, 29, 49, 69, 89} if m > 0.
LINKS
FORMULA
a(n) = 100 * A227870(floor(n/5)) + 20 * (n mod 5) + 9, for n > 4.
EXAMPLE
29 is a term since it has one even digit (2) and one odd digit (9), and 29+1 = 30 also has one even digit (0) and one odd digit (3).
MATHEMATICA
q[n_] := Module[{d = Differences[Tally[Mod[IntegerDigits[n], 2]]]}, d != {} && d[[1, 2]] == 0]; Select[Range[3000], q[#] && q[# + 1] &]
PROG
(PARI) iseq(n) = {my(o = 0, e = 0); while(n > 0, if((n%10) % 2 == 0, e++, o++); n \= 10); e == o; }
lista(kmax) = {my(q1 = 0, q2); for(k = 1, kmax, q2 = iseq(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2); }
CROSSREFS
Subsequence of A017377 and A227870.
Cf. A337238 (binary analog), A373505.
KEYWORD
nonn,base,easy
AUTHOR
Amiram Eldar, Jun 07 2024
STATUS
approved
a(n) = 9*floor(n/2).
+0
1
0, 9, 9, 18, 18, 27, 27, 36, 36, 45, 45, 54, 54, 63, 63, 72, 72, 81, 81, 90, 90, 99, 99, 108, 108, 117, 117, 126, 126, 135, 135, 144, 144, 153, 153, 162, 162, 171, 171, 180, 180, 189, 189, 198, 198, 207, 207, 216, 216, 225, 225, 234, 234, 243, 243, 252, 252, 261
OFFSET
1,2
FORMULA
a(n) = 9*n - a(n-1) - 9, with n>1, a(1)=0.
G.f.: 9*x^2/((1+x)*(x-1)^2). - Vincenzo Librandi, Sep 19 2013
a(n) = a(n-1) +a(n-2) -a(n-3). - Vincenzo Librandi, Sep 19 2013
E.g.f.: (9/4)*(1 + (2*x - 1)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 22 2016
MATHEMATICA
Table[9 Floor[n/2], {n, 70}] (* or *) CoefficientList[Series[9 x/((1 + x) (x - 1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 19 2013 *)
LinearRecurrence[{1, 1, -1}, {0, 9, 9}, 60] (* Harvey P. Dale, Apr 21 2019 *)
PROG
(Magma) [9*Floor(n/2): n in [1..70]]; // Vincenzo Librandi, Sep 19 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 25 2009
EXTENSIONS
New definition by Vincenzo Librandi, Sep 19 2013
STATUS
approved
Positive integers k that are the product of two integers ending with 3.
+0
11
9, 39, 69, 99, 129, 159, 169, 189, 219, 249, 279, 299, 309, 339, 369, 399, 429, 459, 489, 519, 529, 549, 559, 579, 609, 639, 669, 689, 699, 729, 759, 789, 819, 849, 879, 909, 939, 949, 969, 989, 999, 1029, 1059, 1079, 1089, 1119, 1149, 1179, 1209, 1219, 1239, 1269
OFFSET
1,1
COMMENTS
All the terms end with 9 (A017377).
LINKS
FORMULA
Limit_{n->oo} a(n)/a(n-1) = 1.
EXAMPLE
9 = 3*3, 39 = 3*13, 69 = 3*23, 99 = 3*33, 129 = 3*43, 159 = 3*53, 169 = 13*13, 189 = 3*63, ...
MATHEMATICA
a={}; For[n=0, n<=250, n++, For[k=0, k<=n, k++, If[Mod[10*n+9, 10*k+3]==0 && Mod[(10*n+9)/(10*k+3), 10]==3&& 10*n+9>Max[a], AppendTo[a, 10*n+9]]]]; a
PROG
(Python)
def aupto(lim): return sorted(set(a*b for a in range(3, lim//3+1, 10) for b in range(a, lim//a+1, 10)))
print(aupto(1270)) # Michael S. Branicky, Aug 08 2021
CROSSREFS
Cf. A017377 (supersequence), A053742 (ending with 5), A139245 (ending with 2), A324297 (ending with 6), A346951, A346952, A346953.
KEYWORD
nonn,base
AUTHOR
Stefano Spezia, Aug 08 2021
STATUS
approved
a(n) = 10*binomial(n,2) + 9*n.
+0
14
0, 9, 28, 57, 96, 145, 204, 273, 352, 441, 540, 649, 768, 897, 1036, 1185, 1344, 1513, 1692, 1881, 2080, 2289, 2508, 2737, 2976, 3225, 3484, 3753, 4032, 4321, 4620, 4929, 5248, 5577, 5916, 6265, 6624, 6993, 7372, 7761, 8160, 8569, 8988, 9417, 9856, 10305, 10764
OFFSET
0,2
COMMENTS
Also, second 12-gonal (or dodecagonal) numbers. Identity for the numbers b(n)=n*(h*n+h-2)/2 (see Crossrefs): Sum_{i=0..n} (b(n)+i)^2 = (Sum_{i=n+1..2*n} (b(n)+i)^2) + h*(h-4)*A000217(n)^2 for n>0. - Bruno Berselli, Jan 15 2011
Sequence found by reading the line from 0, in the direction 0, 28, ..., and the line from 9, in the direction 9, 57, ..., in the square spiral whose vertices are the generalized 12-gonal numbers A195162. - Omar E. Pol, Jul 24 2012
Bisection of A195162. - Omar E. Pol, Aug 04 2012
LINKS
L. Hogben, Choice and Chance by Cardpack and Chessboard, Vol. 1, Max Parrish and Co, London, 1950, p. 36.
FORMULA
From R. J. Mathar, Mar 06 2008: (Start)
O.g.f.: x*(9+x)/(1-x)^3.
a(n) = n*(5*n+4). (End)
a(n) = a(n-1) + 10*n - 1 (with a(0)=0). - Vincenzo Librandi, Nov 24 2009
a(n) = Sum_{i=0..n-1} A017377(i) for n>0. - Bruno Berselli, Jan 15 2011
a(n) = A131242(10n+8). - Philippe Deléham, Mar 27 2013
Sum_{n>=1} 1/a(n) = 5/16 + sqrt(1 + 2/sqrt(5))*Pi/8 - 5*log(5)/16 - sqrt(5)*log((1 + sqrt(5))/2)/8 = 0.2155517745488486003038... . - Vaclav Kotesovec, Apr 27 2016
From G. C. Greubel, Oct 29 2016: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
E.g.f.: x*(9 + 5*x)*exp(x). (End)
a(n) = A003154(n+1) - A000290(n+1). - Leo Tavares, Mar 29 2022
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {0, 9, 28}, 50] (* or *) Table[5*n^2 + 4*n, {n, 0, 50}] (* G. C. Greubel, Oct 29 2016 *)
Table[10 Binomial[n, 2]+9n, {n, 0, 60}] (* Harvey P. Dale, Jun 14 2023 *)
PROG
(PARI) a(n) = 10*binomial(n, 2) + 9*n \\ Charles R Greathouse IV, Jun 11 2015
(Magma) [n*(5*n+4): n in [0..50]]; // G. C. Greubel, Jul 04 2019
(Sage) [n*(5*n+4) for n in (0..50)] # G. C. Greubel, Jul 04 2019
(GAP) List([0..50], n-> n*(5*n+4)) # G. C. Greubel, Jul 04 2019
CROSSREFS
Second n-gonal numbers: A005449, A014105, A147875, A045944, A179986, A033954, A062728, this sequence.
Cf. A195162.
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 04 2008
STATUS
approved
Decimal representation ends with either 2 or 9.
+0
15
2, 9, 12, 19, 22, 29, 32, 39, 42, 49, 52, 59, 62, 69, 72, 79, 82, 89, 92, 99, 102, 109, 112, 119, 122, 129, 132, 139, 142, 149, 152, 159, 162, 169, 172, 179, 182, 189, 192, 199, 202, 209, 212, 219, 222, 229, 232, 239, 242, 249, 252, 259, 262, 269, 272, 279, 282, 289, 292, 299, 302, 309, 312, 319, 322, 329, 332, 339
OFFSET
1,1
COMMENTS
Natural numbers not in A273664.
FORMULA
a(n) = 10*(((n-2)+A000035(n))/2) + 2 [when n is odd], or + 9 [when n is even].
For n >= 5, a(n) = 2*a(n-2) - a(n-4).
a(n) = A126760(A084967(n)).
a(n) = A249746((3*A249745(n))-1).
Other identities. For all n >= 1:
A084967(n) = 5*A007310(n) = A007310(a(n)).
G.f.: x*(x^2+7*x+2)/((x+1)*(x-1)^2).
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt((1+1/sqrt(5))/2)*phi^2*Pi/10 - log(phi)/(2*sqrt(5)) - log(2)/5, where phi is the golden ratio (A001622). - Amiram Eldar, Apr 15 2023
MATHEMATICA
Select[Range@ 340, MemberQ[{2, 9}, Mod[#, 10]] &] (* or *)
Table[{10 n + 2, 10 n + 9}, {n, 0, 33}] // Flatten (* or *)
CoefficientList[Series[(-5/(1 - x) + (11 - x)/(-1 + x)^2 - 2/(1 + x))/2, {x, 0, 67}], x] (* Michael De Vlieger, Aug 07 2016 *)
PROG
(Scheme)
(define (A273669 n) (+ (* 10 (/ (+ (- n 2) (if (odd? n) 1 0)) 2)) (if (odd? n) 2 9)))
CROSSREFS
Sequences A017293 and A017377 interleaved.
Cf. also A273664, A249824, A275716.
KEYWORD
nonn,base,easy
AUTHOR
Antti Karttunen, Aug 06 2016
STATUS
approved
Numbers 1 through 8 together with numbers congruent to 9 mod 10.
+0
2
1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, 109, 119, 129, 139, 149, 159, 169, 179, 189, 199, 209, 219, 229, 239, 249, 259, 269, 279, 289, 299, 309, 319, 329, 339, 349, 359, 369, 379, 389, 399, 409, 419, 429, 439, 449, 459, 469, 479, 489, 499, 509, 519, 529, 539, 549, 559, 569, 579, 589, 599, 609
OFFSET
1,2
COMMENTS
In lunar arithmetic, numbers n with the property that the sum of the divisors of n that are <= n is equal to n.
LINKS
D. Applegate, M. LeBrun and N. J. A. Sloane, Dismal Arithmetic [Note: we have now changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing]
FORMULA
G.f.: x*(1+9*x^9)/(1-x)^2. - Bruno Berselli, May 23 2011
a(n) = 2*a(n-1) -a(n-2). - Vincenzo Librandi, Jul 12 2012
PROG
(Maxima) makelist(if n<9 then n else 10*n-81, n, 1, 70); /* Bruno Berselli, May 24 2011 */
(Magma) [n lt 9 select n else 10*n-81: n in [1..70]]; // Bruno Berselli, May 24 2011
CROSSREFS
Cf. A017377.
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, May 23 2011
STATUS
approved

Search completed in 0.022 seconds