cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-20 of 41 results. Next

A348055 Number of positive integers with n digits that are the product of two integers ending with 7.

Original entry on oeis.org

0, 1, 20, 255, 3064, 34743, 380939, 4089499, 43282317, 453472867, 4715695283, 48760330737, 501941505404, 5148657883067, 52659616820819
Offset: 1

Views

Author

Stefano Spezia, Sep 26 2021

Keywords

Comments

a(n) is the number of n-digit numbers in A348054.

Crossrefs

Cf. A346509 (ending with 1), A346629 (ending with 2), A346952 (ending with 3), A347255 (ending with 4), A337855 (ending with 5), A337856 (ending with 6), A348549 (ending with 8).

Programs

  • Python
    def a(n):
      lo, hi = 10**(n-1), 10**n
      return len(set(a*b for a in range(7, hi//7+1, 10) for b in range(a, hi//a+1, 10) if lo <= a*b < hi))
    print([a(n) for n in range(1, 9)]) # Michael S. Branicky, Sep 26 2021

Formula

a(n) < A052268(n).
Conjecture: lim_{n->infinity} a(n)/a(n-1) = 10.

Extensions

a(9)-a(11) from Michael S. Branicky, Sep 26 2021
a(12)-a(15) from Martin Ehrenstein, Oct 25 2021

A348487 Positive numbers whose square starts and ends with exactly one 1.

Original entry on oeis.org

1, 11, 39, 41, 101, 111, 119, 121, 129, 131, 139, 141, 319, 321, 329, 331, 349, 351, 359, 361, 369, 371, 379, 381, 389, 391, 399, 401, 409, 411, 419, 421, 429, 431, 439, 441, 1001, 1009, 1011, 1019, 1021, 1029, 1031, 1039, 1041, 1099, 1101, 1109, 1111, 1119, 1121, 1129, 1131, 1139
Offset: 1

Views

Author

Bernard Schott, Oct 21 2021

Keywords

Comments

When a square ends with 1, this square ends with exactly one 1.
Sequences A000533 and A253213 show that there are an infinity of terms. The square of their terms, for n >= 3, starts and ends with exactly one 1. Also, the numbers 119, 1119, 11119, ..., ((10^k + 71) / 9)^2, (k >= 3) are terms. The squares ((10^k + 71) / 9)^2, have the last digit 1 and because 12*10^(2*k - 3) < ((10^k + 71) / 9)^2 <13*10^(2*k - 3), for k >= 3, the squares ((10^k + 71) / 9)^2, k >= 4, start with 12. - Marius A. Burtea, Oct 21 2021

Examples

			39 is a term since 39^2 = 1521.
109 is not a term since 109^2 = 11881.
119 is a term since 119^2 = 14161.
		

Crossrefs

Cf. A045855, A090771, A253213, A273372 (squares ending with 1), A017281, A017377.
Cf. A000533, A253213 for n >= 2 (subsequences).
Subsequence of A305719.

Programs

  • Magma
    [1] cat [n:n in [2..1200]|Intseq(n*n)[1] eq 1 and Intseq(n*n)[#Intseq(n*n)] eq 1 and Intseq(n*n)[-1+#Intseq(n*n)] ne 1]; // Marius A. Burtea, Oct 21 2021
  • Mathematica
    Join[{1}, Select[Range[11, 1200], (d = IntegerDigits[#^2])[[1]] == d[[-1]] == 1 && d[[2]] != 1 &]] (* Amiram Eldar, Oct 21 2021 *)
  • PARI
    isok(k) = my(d=digits(sqr(k))); (d[1]==1) && (d[#d]==1) && if (#d>2, (d[2]!=1) && (d[#d-1]!=1), 1); \\ Michel Marcus, Oct 21 2021
    
  • Python
    from itertools import count, takewhile
    def ok(n):
      s = str(n*n); return len(s.rstrip("1")) == len(s.lstrip("1")) == len(s)-1
    def aupto(N):
      r = takewhile(lambda x: x<=N, (10*i+d for i in count(0) for d in [1, 9]))
      return [k for k in r if ok(k)]
    print(aupto(1140)) # Michael S. Branicky, Oct 21 2021
    

A017378 a(n) = (10*n + 9)^2.

Original entry on oeis.org

81, 361, 841, 1521, 2401, 3481, 4761, 6241, 7921, 9801, 11881, 14161, 16641, 19321, 22201, 25281, 28561, 32041, 35721, 39601, 43681, 47961, 52441, 57121, 62001, 67081, 72361, 77841, 83521, 89401, 95481, 101761, 108241, 114921, 121801, 128881, 136161, 143641
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A017377.

Programs

  • Magma
    [(10*n+9)^2: n in [0..40]]; // Vincenzo Librandi, Aug 31 2011
    
  • Maple
    A017378:=n->(10*n+9)^2: seq(A017378(n), n=0..50); # Wesley Ivan Hurt, Mar 30 2017
  • Mathematica
    Table[(10 n + 9)^2, {n, 0, 37}] (* or *)
    LinearRecurrence[{3, -3, 1}, {81, 361, 841}, 38] (* or *)
    CoefficientList[Series[(81 + 118 x + x^2)/(1 - x)^3, {x, 0, 37}], x] (* Michael De Vlieger, Mar 30 2017 *)
  • PARI
    a(n) = (10*n+9)^2; \\ Michel Marcus, Aug 26 2015
    
  • PARI
    Vec((81 + 118*x + x^2) / (1 - x)^3 + O(x^40)) \\ Colin Barker, Mar 30 2017

Formula

From Colin Barker, Mar 30 2017: (Start)
G.f.: (81 + 118*x + x^2) / (1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>2.
(End)

A262389 Numbers whose last digit is composite.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Sep 21 2015

Keywords

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).

Crossrefs

Cf. A118951, A197652, A260181 (last digit is prime).

Programs

  • 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
  • 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 *)

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

Extensions

Name edited by Jon E. Schoenfield, Feb 15 2018

A273372 Squares ending in digit 1.

Original entry on oeis.org

1, 81, 121, 361, 441, 841, 961, 1521, 1681, 2401, 2601, 3481, 3721, 4761, 5041, 6241, 6561, 7921, 8281, 9801, 10201, 11881, 12321, 14161, 14641, 16641, 17161, 19321, 19881, 22201, 22801, 25281, 25921, 28561, 29241, 32041, 32761, 35721, 36481, 39601, 40401
Offset: 1

Views

Author

Vincenzo Librandi, May 21 2016

Keywords

Comments

Intersection of A000290 and A017281; also, union of A017282 and A017378. The square roots are in A017281 or in A017377 (numbers ending in 1 or 9, respectively). - David A. Corneth, May 22 2016

Crossrefs

Cf. A017281 (numbers ending in 1), A017283 (cubes ending in 1).
Cf. similar sequences listed in A273373.

Programs

  • Magma
    /* By definition: */ [n^2: n in [0..200] | Modexp(n,2,10) eq 1];
    
  • Magma
    [5*(10*n+(-1)^n-5)*(2*n+(-1)^n-1)/4+1: n in [1..50]];
    
  • Mathematica
    Table[5 (10 n + (-1)^n - 5) (2 n + (-1)^n - 1)/4 + 1, {n, 1, 50}]
  • Python
    A273372_list = [(10*n+m)**2 for n in range(10**3) for m in (1,9)] # Chai Wah Wu, May 24 2016
  • Ruby
    p (1..(n + 1) / 2).inject([]){|s, i| s + [(10 * i - 9) ** 2, (10 * i - 1) ** 2]}[0..n - 1] # Seiichi Manyama, May 24 2016
    

Formula

G.f.: x*(1 + 80*x + 38*x^2 + 80*x^3 + x^4) / ((1 + x)^2*(1 - x)^3).
a(n) = 10*A132356(n-1) + 1 = 5*(10*n+(-1)^n-5)*(2*n+(-1)^n-1)/4+1.
a(n) = (5*n - 5/2 + (3/2)*(-1)^n)^2 = 25*n^2 - 25*n + 17/2 + 15*n*(-1)^n - (15/2)*(-1)^n. - David A. Corneth, May 21 2016
a(n) = A090771(n)^2. - Michel Marcus, May 25 2016
Sum_{n>=1} 1/a(n) = Pi^2*(3+sqrt(5))/50. - Amiram Eldar, Feb 16 2023

Extensions

Edited by Bruno Berselli, May 24 2016

A322489 Numbers k such that k^k ends with 4.

Original entry on oeis.org

2, 18, 22, 38, 42, 58, 62, 78, 82, 98, 102, 118, 122, 138, 142, 158, 162, 178, 182, 198, 202, 218, 222, 238, 242, 258, 262, 278, 282, 298, 302, 318, 322, 338, 342, 358, 362, 378, 382, 398, 402, 418, 422, 438, 442, 458, 462, 478, 482, 498, 502, 518, 522, 538, 542, 558
Offset: 1

Views

Author

Bruno Berselli, Dec 12 2018

Keywords

Comments

Also numbers k == 2 (mod 4) such that 2^k and k^2 end with the same digit.
Numbers congruent to {2, 18} mod 20. - Amiram Eldar, Feb 27 2023

Crossrefs

Subsequence of A139544, A235700.
Numbers k such that k^k ends with d: A008592 (d=0), A017281 (d=1), A067870 (d=3), this sequence (d=4), A017329 (d=5), A271346 (d=6), A322490 (d=7), A017377 (d=9).

Programs

  • GAP
    List([1..70], n -> 10*n+3*(-1)^n-5);
    
  • Julia
    [10*n+3*(-1)^n-5 for n in 1:70] |> println
    
  • Magma
    [10*n+3*(-1)^n-5: n in [1..70]];
    
  • Maple
    select(n->n^n mod 10=4,[$1..558]); # Paolo P. Lava, Dec 18 2018
  • Mathematica
    Table[10 n + 3 (-1)^n - 5, {n, 1, 60}]
  • Maxima
    makelist(10*n+3*(-1)^n-5, n, 1, 70);
    
  • PARI
    apply(A322489(n)=10*n+3*(-1)^n-5, [1..70]) \\ M. F. Hasler, Dec 14 2018
    
  • PARI
    Vec(2*x*(1 + 8*x + x^2) / ((1 - x)^2*(1 + x)) + O(x^70)) \\ Colin Barker, Dec 13 2018
  • Python
    [10*n+3*(-1)**n-5 for n in range(1, 70)]
    
  • Sage
    [10*n+3*(-1)^n-5 for n in (1..70)]
    

Formula

O.g.f.: 2*x*(1 + 8*x + x^2)/((1 + x)*(1 - x)^2).
E.g.f.: 2 + 3*exp(-x) + 5*(2*x - 1)*exp(x).
a(n) = -a(-n+1) = a(n-1) + a(n-2) - a(n-3).
a(n) = 10*n + 3*(-1)^n - 5. Therefore:
a(n) = 10*n - 8 for odd n;
a(n) = 10*n - 2 for even n.
a(n+2*k) = a(n) + 20*k.
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(2*Pi/5)*Pi/20 = sqrt(5+2*sqrt(5))*Pi/20. - Amiram Eldar, Feb 27 2023

A346951 Positive integers k such that 10*k+9 is equal to the product of two integers ending with 3 (A346950).

Original entry on oeis.org

0, 3, 6, 9, 12, 15, 16, 18, 21, 24, 27, 29, 30, 33, 36, 39, 42, 45, 48, 51, 52, 54, 55, 57, 60, 63, 66, 68, 69, 72, 75, 78, 81, 84, 87, 90, 93, 94, 96, 98, 99, 102, 105, 107, 108, 111, 114, 117, 120, 121, 123, 126, 129, 132, 133, 135, 138, 141, 144, 146, 147, 150
Offset: 1

Views

Author

Stefano Spezia, Aug 08 2021

Keywords

Examples

			15 is a term because 3*53 = 159 = 15*10 + 9.
		

Crossrefs

Cf. A016873 (ending with 5), A017377, A324298 (ending with 6), A346950, A346952, A346953.

Programs

  • Mathematica
    a={}; For[n=0, n<=150, 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[10a+9], AppendTo[a, n]]]]; a
  • Python
    def aupto(lim): return sorted(set(a*b//10 for a in range(3, 10*lim//3+4, 10) for b in range(a, 10*lim//a+4, 10) if a*b//10 <= lim))
    print(aupto(150)) # Michael S. Branicky, Aug 11 2021

Formula

a(n) = (A346950(n) - 9)/10.
Lim_{n->infinity} a(n)/a(n-1) = 1.

A346953 a(n) is the number of divisors of A346950(n) ending with 3.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Aug 08 2021

Keywords

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

Examples

			a(17) = 4 since there are 4 divisors of A346950(17) = 429 ending with 3: 3, 13, 33 and 143.
		

Crossrefs

Cf. A000005, A017377, A346388 (ending with 5), A346389 (ending with 6), A346950, A346951, A346952.

Programs

  • 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
  • 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

A017379 a(n) = (10*n + 9)^3.

Original entry on oeis.org

729, 6859, 24389, 59319, 117649, 205379, 328509, 493039, 704969, 970299, 1295029, 1685159, 2146689, 2685619, 3307949, 4019679, 4826809, 5735339, 6751269, 7880599, 9129329, 10503459, 12008989
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A017377 (10n+9), A000578 (n^3).

Programs

  • Magma
    [(10*n+9)^3: n in [0..40]]; // Vincenzo Librandi, Aug 31 2011
    
  • Mathematica
    (10Range[0,30]+9)^3 (* or *) LinearRecurrence[{4,-6,4,-1},{729,6859,24389,59319},30] (* Harvey P. Dale, Nov 01 2011 *)
  • PARI
    vector(40, n, n--; (10*n + 9)^3) \\ G. C. Greubel, Nov 10 2018

Formula

a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4); a(0)=729, a(1)=6859, a(2)=24389, a(3)=59319. - Harvey P. Dale, Nov 01 2011

A053181 Composite numbers ending in 9.

Original entry on oeis.org

9, 39, 49, 69, 99, 119, 129, 159, 169, 189, 209, 219, 249, 259, 279, 289, 299, 309, 319, 329, 339, 369, 399, 429, 459, 469, 489, 519, 529, 539, 549, 559, 579, 589, 609, 629, 639, 649, 669, 679, 689, 699, 729, 749, 759, 779, 789, 799, 819, 849, 869, 879, 889, 899
Offset: 1

Views

Author

Enoch Haga, Feb 29 2000

Keywords

Comments

Numbers of the form 10n + 9 (A017377) not in A030433. Obviously multiples of 2 or 5 can't be in A017377 nor this sequence. All other primes occur as factors of these terms infinitely often. For example: If n is a multiple of 3, then 10n + 9 is in this sequence; if n = 4 mod 7, then 10n + 9 is in this sequence; if n = 9 mod 11, then 10n + 9 is in this sequence; and so on and so forth. The first of these congruences to be satisfied determines the least prime factor of 10n + 9. - Alonso del Arte, Jun 23 2011

Programs

  • Mathematica
    Complement[Range[9, 1000, 10], Prime[Range[PrimePi[1000]]]] (* Alonso del Arte, Jun 23 2011 *)
    Select[Range[1000],CompositeQ[#]&&Mod[#,10]==9&] (* Harvey P. Dale, May 01 2016 *)
  • PARI
    forstep(n=9,1e3,10,if(!isprime(n),print1(n", "))) \\ Charles R Greathouse IV, Jun 24 2011

Formula

a(n) ~ 10n. - Charles R Greathouse IV, Jun 24 2011

Extensions

9 added by Kausthub Gudipati, Jun 16 2011
Previous Showing 11-20 of 41 results. Next