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.

Showing 1-10 of 15 results. Next

A166727 Positive integers with English names ending in "r".

Original entry on oeis.org

4, 24, 34, 44, 54, 64, 74, 84, 94, 104, 124, 134, 144, 154, 164, 174, 184, 194, 204, 224, 234, 244, 254, 264, 274, 284, 294, 304, 324, 334, 344, 354, 364, 374, 384, 394, 404, 424, 434, 444, 454, 464, 474, 484, 494, 504, 524, 534, 544, 554, 564, 574, 584, 594
Offset: 1

Views

Author

Rick L. Shepherd, Oct 20 2009

Keywords

Examples

			Fifty-four (54) is a term; fourteen (14) is not a term (but is a term of A060228).
		

Crossrefs

Programs

  • Python
    def a(n): return (n-1)//9*100 + ((n-1)%9 + 1)*((n-1)%9 > 0)*10 + 4
    print([a(n) for n in range(1, 55)]) # Michael S. Branicky, Apr 24 2021

Formula

A017317 MINUS {n | n = 14 mod 100}.
a(n) = a(n-9) + 100, for n >= 10. - Michael S. Branicky, Apr 24 2021

A031914 a(n) = prime(10*n - 6).

Original entry on oeis.org

7, 43, 89, 139, 193, 251, 311, 373, 433, 491, 569, 619, 683, 757, 827, 887, 971, 1033, 1097, 1181, 1249, 1307, 1423, 1481, 1549, 1609, 1693, 1759, 1861, 1931, 2003, 2083, 2143, 2243, 2311, 2383, 2459, 2551, 2657, 2707, 2777, 2851, 2939
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [ NthPrime(10*n-6): n in [1..1000] ]; // Vincenzo Librandi, Apr 08 2011
    
  • Mathematica
    Prime[10Range[50]-6] (* Harvey P. Dale, May 08 2011 *)
  • SageMath
    [nth_prime(10*n-6) for n in range(1,61)] # G. C. Greubel, Feb 18 2024

Formula

a(n) = A000040(A017317(n-1)). - G. C. Greubel, Feb 18 2024

A273375 Squares ending in digit 4.

Original entry on oeis.org

4, 64, 144, 324, 484, 784, 1024, 1444, 1764, 2304, 2704, 3364, 3844, 4624, 5184, 6084, 6724, 7744, 8464, 9604, 10404, 11664, 12544, 13924, 14884, 16384, 17424, 19044, 20164, 21904, 23104, 24964, 26244, 28224, 29584, 31684, 33124, 35344, 36864, 39204, 40804, 43264
Offset: 1

Views

Author

Vincenzo Librandi, May 24 2016

Keywords

Crossrefs

Cf. A017317 (numbers ending in 4), A017319 (cubes ending in 4).
Cf. similar sequences listed in A273373.

Programs

  • Magma
    /* By definition: */ [n^2: n in [0..200] | Modexp(n, 2, 10) eq 4];
    
  • Magma
    [(10*n+(-1)^n-5)^2/4: n in [1..50]];
  • Mathematica
    Table[(10 n + (-1)^n - 5)^2/4, {n, 1, 50}] (* or *) LinearRecurrence[{1, 2, -2, -1, 1}, {4, 64, 144, 324, 484}, 50]
    Select[Range[200]^2,Mod[#,10]==4&] (* or *) LinearRecurrence[{1,1,-1},{2,8,12},40]^2(* Harvey P. Dale, Aug 06 2017 *)

Formula

G.f.: 4*x*(1 + 15*x + 18*x^2 + 15*x^3 + x^4) /((1+x)^2*(1-x)^3).
a(n) = 4*A047209(n)^2 = (10*n + (-1)^n - 5)^2/4.
Sum_{n>=1} 1/a(n) = 2*Pi^2/(25*(5-sqrt(5))). - Amiram Eldar, Feb 16 2023
E.g.f.: (4 - 5*x + 25*x^2)*cosh(x) + (9 + 5*x + 25*x^2)*sinh(x) - 4. - Stefano Spezia, Feb 21 2025

Extensions

Edited by Bruno Berselli, May 24 2016

A348488 Positive numbers whose square starts and ends with exactly one 4.

Original entry on oeis.org

2, 22, 68, 202, 208, 218, 222, 642, 648, 652, 658, 672, 678, 682, 692, 698, 702, 2002, 2008, 2018, 2022, 2028, 2032, 2042, 2048, 2052, 2058, 2068, 2072, 2078, 2082, 2092, 2122, 2128, 2132, 2142, 2148, 2152, 2158, 2168, 2172, 2178, 2182, 2192, 2198, 2202, 2208, 2218, 2222, 2228
Offset: 1

Views

Author

Bernard Schott, Oct 24 2021

Keywords

Comments

When a square ends with 4 (A273375), this square may end with precisely one 4, two 4's or three 4's (A328886).
This sequence is infinite as each 2*(10^m + 1), m >= 1 or 2*(10^m + 4), m >= 2 is a term.
Numbers 2, 22, 222, ..., 2*(10^k - 1) / 9, (k >= 1), as well as numbers 2228, 22228, ..., 2*(10^k + 52) / 9, (k >= 4) are terms and have no digits 0. - Marius A. Burtea, Oct 24 2021

Examples

			22 is a term since 22^2 = 484.
638 is not a term since 638^2 = 407044.
668 is not a term since 668^2 = 446224.
		

Crossrefs

Cf. A045858, A273375 (squares ending with 4), A017317, A328886 (squares ending with three 4).
Cf. A002276 \ {0} (a subsequence).
Subsequence of A305719.
Similar to: A348487 (k=1), this sequence (k=4), A348489 (k=5), A348490 (k=6).

Programs

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

A155156 Triangle T(n, k) = 4*n*k + 2*n + 2*k, read by rows.

Original entry on oeis.org

8, 14, 24, 20, 34, 48, 26, 44, 62, 80, 32, 54, 76, 98, 120, 38, 64, 90, 116, 142, 168, 44, 74, 104, 134, 164, 194, 224, 50, 84, 118, 152, 186, 220, 254, 288, 56, 94, 132, 170, 208, 246, 284, 322, 360, 62, 104, 146, 188, 230, 272, 314, 356, 398, 440, 68, 114, 160, 206, 252, 298, 344, 390, 436, 482, 528
Offset: 1

Views

Author

Vincenzo Librandi, Jan 21 2009

Keywords

Comments

First column: A016933, second column: A017317, third column: A063151, fourth column: 2*A017209. - Vincenzo Librandi, Nov 21 2012

Examples

			Triangle begins:
   8;
  14,  24;
  20,  34,  48;
  26,  44,  62,  80;
  32,  54,  76,  98, 120;
  38,  64,  90, 116, 142, 168;
  44,  74, 104, 134, 164, 194, 224;
  50,  84, 118, 152, 186, 220, 254, 288;
  56,  94, 132, 170, 208, 246, 284, 322, 360;
  62, 104, 146, 188, 230, 272, 314, 356, 398, 440;
		

Crossrefs

Programs

  • Magma
    [4*n*k + 2*n + 2*k : k in [1..n], n in [1..11]]; // Vincenzo Librandi, Nov 21 2012
    
  • Maple
    seq(seq( 2*(2*n*k +n+k), k=1..n), n=1..15); # G. C. Greubel, Mar 20 2021
  • Mathematica
    T[n_,k_]:=4*n*k +2*n +2*k; Table[T[n, k], {n, 15}, {k, n}]//Flatten (* Vincenzo Librandi, Nov 21 2012 *)
  • Sage
    flatten([[2*(2*n*k +n+k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Mar 20 2021

Formula

T(n, k) = 2*A083487(n, k). - R. J. Mathar, Jan 05 2011
Sum_{k=0..n} T(n,k) = n*(2*n^2 + 5*n + 1) = 2*A162254(n) = A163832(n). - G. C. Greubel, Mar 20 2021

Extensions

Edited by Robert Hochberg, Jun 21 2010

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

A304158 a(n) is the second Zagreb index of the linear phenylene G[n], defined pictorially in the Darafsheh reference (Fig. 3).

Original entry on oeis.org

24, 84, 144, 204, 264, 324, 384, 444, 504, 564, 624, 684, 744, 804, 864, 924, 984, 1044, 1104, 1164, 1224, 1284, 1344, 1404, 1464, 1524, 1584, 1644, 1704, 1764, 1824, 1884, 1944, 2004, 2064, 2124, 2184, 2244, 2304, 2364, 2424, 2484, 2544, 2604, 2664, 2724, 2784, 2844, 2904, 2964
Offset: 1

Views

Author

Emeric Deutsch, May 08 2018

Keywords

Comments

The second Zagreb index of a simple connected graph is the sum of the degree products d(i)d(j) over all edges ij of the graph.
The M-polynomial of the linear phenylene G[n] is M(G[n];x,y) = 6*x^2*y^2 + 4*(n - 1)*x^2*y^3 + 4(n - 1)*x^3*y^3.

Examples

			a(1) = 24; indeed, G[1] is a hexagon; we have 6 edges, each with end vertices of degree 2; then the second Zagreb index is 6*2*2 =24.
		

Crossrefs

Subsequence of A121024.

Programs

  • Julia
    [60*n-36 for n in 1:50] |> println # Bruno Berselli, May 09 2018
    
  • Maple
    seq(60*n - 36, n = 1 .. 40);
  • PARI
    a(n) = 60*n-36; \\ Altug Alkan, May 09 2018
    
  • PARI
    Vec(12*x*(2 + 3*x)/(1 - x)^2 + O(x^40)) \\ Colin Barker, May 23 2018

Formula

a(n) = 60*n - 36.
a(n) = 12 * A016873(n-1). - Alois P. Heinz, May 09 2018
From Bruno Berselli, May 09 2018: (Start)
O.g.f.: 12*x*(2 + 3*x)/(1 - x)^2.
E.g.f.: 12*(3 - 3*exp(x) + 5*x*exp(x)).
a(n) = 2*a(n-1) - a(n-2).
a(n) = A008594(5*n-3) = A017317(6*n-4) = A072710(4*n-2) = A139245(3*n-1). (End)

A348832 Positive numbers whose square starts and ends with exactly 444.

Original entry on oeis.org

666462, 666538, 666962, 667038, 2107462, 2107538, 2107962, 2108038, 2108462, 2108538, 2108962, 2109038, 2109462, 6663462, 6663538, 6663962, 6664038, 6664462, 6664538, 6664962, 6665038, 6665462, 6665538, 6665962, 6666038, 6667462, 6667538, 6667962, 6668038, 6668462, 6668538, 6668962
Offset: 1

Views

Author

Bernard Schott, Nov 09 2021

Keywords

Comments

The 1st problem of British Mathematical Olympiad (BMO) in 1995 (see link) asked to find all positive integers whose squares end in three 4’s (A039685); this sequence is the subsequence of these integers whose squares also start in precisely three 4's (no four or more 4's). Two such infinite subsequences are proposed below.
When a square starts and ends with digits ddd, then ddd is necessarily 444.
The first 3 digits of terms are either 210, 666 or 667, while the last 3 digits are either 038, 462, 538 or 962 (see examples).
From Marius A. Burtea, Nov 09 2021 : (Start)
The sequence is infinite because the numbers 667038, 6670038, 66700038, 667000038, ..., 667*10^k + 38, k >= 3, are terms because are square 444939693444, 44489406921444, 4448895069201444, 444889050692001444, 44488900506920001444, ...
Also, 6663462, 66633462, 666333462, 6663333462, ..., (1999*10^k + 386) / 3, k >= 4, are terms and have no digits 0, because their squares are 44401725825444, 4440018258105444, 444000282580905444, 44400012825808905444,
4440001128258088905444, ... (End)

Examples

			666462 is a term since 666462^2 = 444171597444.
21038 is not a term since 21038^2 = 442597444.
		

References

  • A. Gardiner, The Mathematical Olympiad Handbook: An Introduction to Problem Solving, Oxford University Press, 1997, reprinted 2011, Pb 1 pp. 55 and 95-96 (1995)

Crossrefs

Subsequence of A039685, A045858, A273375, A305719, A346892.
Similar to: A348488 (d=4), A348831 (dd=44), this sequence (ddd=444).

Programs

  • Magma
    fd:=func; fs:=func; [n:n in [1..6700000]|fd(n) and fs(n)]; // Marius A. Burtea, Nov 09 2021
  • Mathematica
    Select[Range[100, 7*10^6], (d = IntegerDigits[#^2])[[1 ;; 3]] == d[[-3 ;; -1]] == {4, 4, 4} && d[[-4]] != 4 && d[[4]] != 4 &] (* Amiram Eldar, Nov 09 2021 *)
  • Python
    from itertools import count, takewhile
    def ok(n):
      s = str(n*n); return len(s.rstrip("4")) == len(s.lstrip("4")) == len(s)-3
    def aupto(N):
      ends = [38, 462, 538, 962]
      r = takewhile(lambda x: x<=N, (1000*i+d for i in count(0) for d in ends))
      return [k for k in r if ok(k)]
    print(aupto(6668962)) # Michael S. Branicky, Nov 09 2021
    

A385623 Array read by ascending antidiagonals: A(n,k) is the number obtained by concatenation of n with k in that order, with k >= 0.

Original entry on oeis.org

0, 10, 1, 20, 11, 2, 30, 21, 12, 3, 40, 31, 22, 13, 4, 50, 41, 32, 23, 14, 5, 60, 51, 42, 33, 24, 15, 6, 70, 61, 52, 43, 34, 25, 16, 7, 80, 71, 62, 53, 44, 35, 26, 17, 8, 90, 81, 72, 63, 54, 45, 36, 27, 18, 9, 100, 91, 82, 73, 64, 55, 46, 37, 28, 19, 10, 110, 101, 92, 83, 74, 65, 56, 47, 38, 29, 110, 11
Offset: 0

Views

Author

Stefano Spezia, Jul 05 2025

Keywords

Examples

			Array begins as:
   0,  1,  2,  3,  4,  5,  6,  7, ...
  10, 11, 12, 13, 14, 15, 16, 17, ...
  20, 21, 22, 23, 24, 25, 26, 27, ...
  30, 31, 32, 33, 34, 35, 36, 37, ...
  40, 41, 42, 43, 44, 45, 46, 47, ...
  50, 51, 52, 53, 54, 55, 56, 57, ...
  60, 61, 62, 63, 64, 65, 66, 67, ...
  ...
		

Crossrefs

Cf. A001477 (1st row), A020338 (main diagonal), A055642, A385624 (antidiagonal sums).

Programs

  • Mathematica
    A[n_,k_]:=FromDigits[Join[IntegerDigits[n],IntegerDigits[k]]]; Table[A[n,k],{n,0,6},{k,0,7}] (* or *)
    A[n_,k_]:=If[k==0,10n,n*10^(Floor[Log10[k]]+1)+k]; Table[A[n-k,k],{n,0,11},{k,0,n}]//Flatten
  • PARI
    T(n, k) = fromdigits(concat(digits(n), digits(k))); \\ Michel Marcus, Jul 06 2025

Formula

A(n,0) = 10*n and A(n,k) = n*10^(floor(log_10(k)) + 1) + k for k > 0.

A017323 a(n) = (10*n + 4)^7.

Original entry on oeis.org

16384, 105413504, 4586471424, 52523350144, 319277809664, 1338925209984, 4398046511104, 12151280273024, 29509034655744, 64847759419264, 131593177923584, 250226879128704, 450766669594624, 775771085481344
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [(10*n+4)^7: n in [0..20] ]; // Vincenzo Librandi, Aug 01 2011
    
  • Maple
    A017323:=n->(10*n+4)^7: seq(A017323(n), n=0..30); # Wesley Ivan Hurt, Jan 28 2017
  • Mathematica
    (10*Range[0,20]+4)^7 (* or *) LinearRecurrence[{8,-28,56,-70,56,-28,8,-1},{16384,105413504,4586471424,52523350144,319277809664,1338925209984,4398046511104,12151280273024},20] (* Harvey P. Dale, Aug 26 2015 *)
  • PARI
    a(n)=(10*n+4)^7 \\ Charles R Greathouse IV, Jan 29 2017

Formula

a(n) = 8*a(n-1) - 28*a(n-2) + 56*a(n-3) - 70*a(n-4) + 56*a(n-5) - 28*a(n-6) + 8*a(n-7) - a(n-8); a(0)=16384, a(1)=105413504, a(2)=4586471424, a(3)=52523350144, a(4)=319277809664, a(5)=1338925209984, a(6)=4398046511104, a(7)=12151280273024. - Harvey P. Dale, Aug 26 2015
Showing 1-10 of 15 results. Next