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-6 of 6 results.

A075759 Duplicate of A000993.

Original entry on oeis.org

1, 6, 22, 159, 1044, 9121, 78132, 748719, 7161484, 70800861, 699869892, 6978353179
Offset: 0

Views

Author

Keywords

A030466 Squares that are concatenations of two consecutive nonzero numbers.

Original entry on oeis.org

183184, 328329, 528529, 715716, 60996100, 1322413225, 4049540496, 106755106756, 453288453289, 20661152066116, 29752082975209, 2214532822145329, 2802768328027684, 110213248110213249, 110667555110667556, 147928995147928996, 178838403178838404, 226123528226123529
Offset: 1

Views

Author

Keywords

References

  • British Mathematical Olympiad, 1993, Round 1, Question 1: "Find, showing your method, a six-digit integer n with the following properties: (i) n is a perfect square, (ii) the number formed by the last three digits of n is exactly one greater than the number formed by the first three digits of n. (Thus n might look like 123124, although this is not a square.)"
  • Steve Dinh, The Hard Mathematical Olympiad Problems And Their Solutions, AuthorHouse, 2011, Problem 1 of the British Mathematical Olympiad 1993, page 164.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := IntegerQ[Sqrt[n*10^Floor[1 + Log10[n + 1]] + n + 1]]; (* Robert G. Wilson v, Dec 27 2017 *)
  • PARI
    lista(nn) = forstep(n=183, nn, [3, 5, 7, 5, 3, 1, 4, 7, 5, 3, 5, 7, 5, 3, 5, 7, 5, 3, 5, 7, 4, 1], my(s = eval(concat(Str(n), Str(n+1)))); if(issquare(s), print1(s, ", "))) \\ Iain Fox, Dec 27 2017
    
  • PARI
    eea(x, y) = my(a=max(x,y), b=min(x,y), s=0, so=1, st, r=b, ro=a, rt, q, t); while(r, q=ro\r; rt=r; r=ro-q*r; ro=rt; st=s; s=so-q*s; so=st); t=(ro-so*a)\b; if(x>y, [so, t], [t, so]) \\ Extended Euclidean Algorithm
    lista(nn) = my(res=Set(), b, f2, c, s); for(d=3, nn, b=10^d+1; fordiv(b, f, if(f!=1 && f!=b, f2=b/f; if(gcd(f, f2)==1, c=eea(f, f2); if(c[1]<0, s=f*(f2+2*c[1])*f2*(f-2*c[2])+1, s=f*(2*c[1])*f2*(-2*c[2])+1); if(#digits(s)==d*2, res=setunion(res, Set(s))))))); Vec(res) \\ (Will find all values of length nn*2 or shorter) Iain Fox, Oct 16 2021

Formula

a(n) = A030465(n)*(10^A055642(A030465(n))+1)+1. - Iain Fox, Oct 16 2021

Extensions

a(15)-a(17) from Arkadiusz Wesolowski, Apr 02 2014
a(18) from Iain Fox, Dec 27 2017

A122986 Squares mod 1000.

Original entry on oeis.org

0, 1, 4, 9, 16, 24, 25, 36, 41, 44, 49, 56, 64, 76, 81, 84, 89, 96, 100, 104, 116, 121, 124, 129, 136, 144, 156, 161, 164, 169, 176, 184, 196, 201, 204, 209, 216, 224, 225, 236, 241, 244, 249, 256, 264, 276, 281, 284, 289, 296, 304, 316, 321, 324, 329, 336, 344
Offset: 1

Views

Author

Sergio Pimentel, Sep 22 2006

Keywords

Comments

Possible last three digits of n^2 (leading zeros omitted).
Range of A174452; A010461 is a subset; and also all squares less than 1000 belong to this sequence; the sequence is finite with A000993(3)=159 terms: a(159)=996 is the last term.

Examples

			The last three digits of n^2 can be 000, 001, 236, 241, 996, etc. but not 002, 003, 237, 238, etc.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..999] | IsSquare(R! n) where R:= ResidueClassRing(1000)]; // Vincenzo Librandi, Dec 29 2019
  • Maple
    s:={}: for n from 0 to 999 do s:=s union {n^2 mod 1000}: od: op(s); # Nathaniel Johnston, Jun 22 2011
  • Mathematica
    Union[PowerMod[Range[1000], 2, 1000]] (* Vincenzo Librandi, Dec 29 2019 *)

Extensions

More terms and additional comments from Reinhard Zumkeller, Mar 21 2010
Edited by N. J. A. Sloane, Apr 10 2010

A036688 Number of distinct n-digit suffixes of base-10 squares not containing the digit 0.

Original entry on oeis.org

5, 18, 119, 698, 5449, 41735, 359207, 3085197, 27434602, 243921771, 2188569304, 19636586858
Offset: 1

Views

Author

Keywords

Examples

			Any square ends with one of [ 0 ], 1, 4, 5, 6, 9, so a(1) = 5.
a(3) = A000993(3) - a(2) - #{100, 104, 201, 204, 209, 304, 400, 401, 404, 409, 500, 504, 600, 601, 604, 609, 704, 801, 804, 809, 900, 904} = 159 - 18 - 22 = 119, cf. A122986. - _Reinhard Zumkeller_, Mar 21 2010
		

Crossrefs

Cf. A036788.

Programs

Extensions

Explanation and more terms from David W. Wilson
a(11)-a(12) from Bert Dobbelaere, Mar 10 2021

A039306 Number of distinct quadratic residues mod 9^n.

Original entry on oeis.org

1, 4, 31, 274, 2461, 22144, 199291, 1793614, 16142521, 145282684, 1307544151, 11767897354, 105911076181, 953199685624, 8578797170611, 77209174535494, 694882570819441, 6253943137374964, 56285488236374671, 506569394127372034
Offset: 0

Views

Author

Keywords

Comments

Number of distinct n-digit suffixes of base 9 squares.
From Danny Rorabaugh, Dec 15 2015: (Start)
Construct the word y_n as follows: y_0 = a; y_{n+1} is three concatenated copies of y_n, except that the middle copy is written with letters not used in y_n. For example:
y_0 = a;
y_1 = aba;
y_2 = abacdcaba;
y_3 = abacdcabaefeghgefeabacdcaba.
a(n) is the number of nonempty subwords of y_n that occur as a subword exactly once.
Let s(n, k) be the number of subwords of y_n that occur exactly 2^k times. One can show that s(n, 0) = a(n) using s(n+1, k+1) = s(n, k) + s(n, k+1), binomial(3^n+1, 2) = Sum_{k=0..n) s(n, k)*2^k, and the formulas for a(n) below.
(End)

Examples

			From _Danny Rorabaugh_, Dec 15 2015: (Start)
The squares of the numbers 0..8 are [0, 1, 4, 9, 16, 25, 36, 49, 64]. Modulo 9, these are [0, 1, 4, 0, 7, 7, 0, 4, 1]. Thus there are a(1) = 4 distinct quadratic residues module 9^1 = 9: 0, 1, 4, and 7.
There are a(2) = 31 subwords of y_2 = abacdcaba which occur in y_2 exactly once: [abac, abacd, abacdc, abacdca, abacdcab, abacdcaba, bac, bacd, bacdc, bacdca, bacdcab, bacdcaba, ac, acd, acdc, acdca, acdcab, acdcaba, cd, cdc, cdca, cdcab, cdcaba, d, dc, dca, dcab, dcaba, ca, cab, caba].
(End)
		

Crossrefs

Quadratic residues modulo k^n: A023105 (k=2), A039300 (k=3), A039301 (k=4), A039302 (k=5), A039303 (k=6), A039304 (k=7), A039305 (k=8), this sequence (k=9), A000993 (k=10).

Programs

  • Magma
    I:=[1, 4, 31]; [n le 3 select I[n] else 9*Self(n-1)+Self(n-2)-9*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Apr 22 2012
  • Mathematica
    CoefficientList[Series[(1-6*x)/((1-x)*(1-9*x)),{x,0,30}],x] (* Vincenzo Librandi, Apr 22 2012 *)

Formula

a(n) = floor((9^n+3)*3/8).
G.f.: (1-6*x)/((1-x)*(1-9*x)). - _Colin Barker, Mar 14 2012
a(n) = 9*a(n-1) +a(n-2) -9*a(n-3). - Vincenzo Librandi, Apr 22 2012
a(n) = (5+3^(2n+1))/8 = a(n-1) + 3^(2n-1). - Danny Rorabaugh, Dec 15 2015

A279085 Number of distinct residues of triangular numbers mod 10^n.

Original entry on oeis.org

1, 6, 44, 424, 4176, 41696, 416704, 4166784, 41666816
Offset: 0

Views

Author

Jon E. Schoenfield, Jan 14 2017

Keywords

Comments

Number of distinct n-digit endings of triangular numbers A000217 (written in base 10).

Examples

			The last digit of a triangular number is one of 0, 1, 3, 5, 6, or 8, so a(1) = 6. (To verify that no number from {2, 4, 7, 9} can be the last digit of a triangular number T, note that 8*T+1, which must be a square, would end with 7, 3, 7, or 3, respectively, but no square ends with 3 or 7.)
The 44 two-digit combinations with which a triangular number may end are 00, 01, 03, 05, 06, 10, 11, 15, 16, 20, 21, 25, 26, 28, 30, 31, 35, 36, 40, 41, 45, 46, 50, 51, 53, 55, 56, 60, 61, 65, 66, 70, 71, 75, 76, 78, 80, 81, 85, 86, 90, 91, 95, 96. Of these, there are ten combinations of each of the forms x0, x1, x5, and x6; the other four, which are the only ones that end with a digit other than 0, 1, 5, or 6, are 03, 28, 53, and 78 (i.e., numbers whose residue modulo 25 is 3):
.
                            last digit
                   0  1  2  3  4  5  6  7  8  9
                +------------------------------
              0 | 00 01    03    05 06
              1 | 10 11          15 16
              2 | 20 21          25 26    28
next-to-last  3 | 30 31          35 36
    digit     4 | 40 41          45 46
              5 | 50 51    53    55 56
              6 | 60 61          65 66
              7 | 70 71          75 76    78
              8 | 80 81          85 86
              9 | 90 91          95 96
		

Crossrefs

Formula

(Empirical) a(n) = (5*10^n + (9 - 2*(-1)^n)*2^n)/12.
Showing 1-6 of 6 results.