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.

A064942 Decimal numbers n such that after possibly prefixing leading 0's to n, the resulting number n' can be broken into 2 numbers of equal length, n' = xy, such that x^2+y^2 = n (y may also have leading zeros).

Original entry on oeis.org

1, 1233, 8833, 10100, 990100, 5882353, 94122353, 99009901, 100010000, 1765038125, 2584043776, 7416043776, 8235038125, 9901009901, 48600220401, 116788321168, 123288328768, 601300773101, 876712328768, 883212321168, 990100990100
Offset: 1

Views

Author

Ulrich Schimke (ulrschimke(AT)aol.com)

Keywords

Comments

If A*10^m+B is an element, then so is (10^m-A)*10^m+B (e.g. 1233 <-> 8833 or 010100 <-> 990100)
Since A^2+B^2 = A*10^m+B can be written as 10^(2*m)+1 = (2*A-10^m)^2 + (2*B-1)^2 the number of solutions with 2*m digits (necessary leading zeros count) can be reduced to finding the ways 10^(2*m)+1 can be written as sum of 2 squares. For the following results, see A002654. Since 10^(2*m)+1 is odd and has no prime factors of the form 4*r+3 the number of ways writing 10^(2*m)+1 as sum of 2 squares is just tau(10^(2*m)+1) (order matters). Since changing the order does not lead to a new solution (2*A-10^m is always the even square and 2*B-1 is always the odd square) and since the trivial 10^(2*m)+1 = (10^m)^2 + 1^2 leads to the ambiguous A = 0 and B = 1 there are only tau(10^(2*m)+1)/2-1 relevant ways. Because of the transformation from A to (10^m-A) every of these possibilities leads to a pair of solutions. So the number of solutions with 2*m digits is tau(10^(2*m)+1)-2, see A064943

Examples

			8833 = 88^2 + 33^2, 5882353 = 0588^2 + 2353^2.
		

Crossrefs

Cf. A064943 for the number of solutions, A055616 for the solutions where leading zeros are not allowed, A055617, A055618, A055619 for some infinite subsequences and A002654 for finding the number of ways writing an integer as sum of two squares.
A101311 is another version.

Programs

  • Maple
    with (numtheory): for m from 1 to 10 do: for i in sum2sqr(10^(2*m)+1) do: if i[1] > 1 and i[1] < 10^m then if type(i[1],odd) then a := (i[2]+10^m)/2: b := (i[1]+1)/2: else a := (i[1]+10^m)/2: b := (i[2]+1)/2: fi: print("Length =", 2*m, "Solution =", (10^m-a)*10^m+b): print(Length = 2*m, Solution = a*10^m+b): fi: od: od:

Extensions

Edited by N. J. A. Sloane, Jul 31 2007

A258482 Positive numbers n with concatenations n=x//y such that n=x^2-y^2.

Original entry on oeis.org

100, 147, 10000, 13467, 1000000, 1010100, 1016127, 1034187, 1140399, 1190475, 1216512, 1300624, 1334667, 1416767, 1484847, 1530900, 100000000, 102341547, 102661652, 116604399, 133346667, 159809775, 10000000000, 10101010100, 13333466667, 14848484847
Offset: 1

Views

Author

Pieter Post, May 31 2015

Keywords

Comments

The terms in this sequence have only an odd number of digits. If they would have an even number of digits both parts would have the same length. The maximum difference x^2 - y^2 would be (10^m-1)^2 - 1^2, which is (10^m-2)*10^m. But this is always less than (10^m-1)^2 + 1, so m never equals x^2 - y^2.
For example m=3: 999^2 - 1^2 < 999001.
The terms in this sequence all start with the digit '1'. Suppose they would start with the digit '2' (or more) the smallest possiblity of x^2 - y^2 would be (2*10^m)^2 - (10^m-1)^2 = 3*10^2*m + 2*10^m-1, but this is always more than 2*10^2*m + 10^3-1, so m never equals x^2 - y^2.
For example m=3: 2000^2 - 999^2 > 2000999.
This sequence has an infinite subsequence, since (10^m+(10^m+2)/3)*10^m+(2*10^m+1)/3 equals (10^m+(10^m+2)/3)^2 - ((2*10^m+1)/3)^2 for every positive m.
For example m=3: 1334667 = 1334^2 - 667^2.
This set is a subset of A113797.

Examples

			147 is a member, since 147 = 14^2 - 7^2.
1484847 is a member, since 1484847 = 1484^2- 847^2.
48 is a member of A113797 since 48 = |4^2 - 8^2|, but 48 is not equal to 4^2 - 8^2, so 48 is not a member of this sequence.
		

Crossrefs

Programs

  • PARI
    isok(n) = {d = digits(n); if (#d > 1, for (k=1, #d-1, vba = Vecrev(vector(k, i, d[i])); vbb = Vecrev(vector(#d-k, i, d[k+i])); da = sum(i=1, #vba, vba[i]*10^(i-1)); db = sum(i=1, #vbb, vbb[i]*10^(i-1)); if (da^2 - db^2 == n, return(1));););} \\ Michel Marcus, Jun 14 2015
  • Python
    for p in range(1, 7):
        for i in range(10**p, 10**(p + 1)):
            c = 10**(int((p - 1) / 2) + 1)
            a, b = i // c, i % c
            if i == a**2 - b**2:
                print(i, end=",")
    

Formula

n=x*10^d+y, where 10^(d-1)<=x<10^d and 0<=y<10^d and n=x^2-y^2.

Extensions

More terms from Giovanni Resta, Jun 14 2015

A259379 Numbers k of the form a - b + c, such that k^3 equals the decimal concatenation a//b//c and numbers k, b, and c have the same number of digits.

Original entry on oeis.org

155, 209, 274, 286, 287, 351, 364, 428, 573, 637, 715, 727, 846, 923, 1095, 1096, 2191, 8905, 18182, 18183, 81818, 81819, 326734, 336634, 663367, 673267, 2727273, 2727274, 4545454, 5454547, 7272727, 23529411, 23529412, 76470589
Offset: 1

Views

Author

Pieter Post, Jul 22 2015

Keywords

Comments

This sequence is infinite because it has several infinite subsequences. For example:
274, 326734, 332667334, 3..326..673..34 etc.;
364, 336634, 333666334, 3..36..63..34 etc.;
637, 663367, 666333667, 6..63..36..67 etc.;
727, 673267, 667332667, 6..673..326..67 etc.
Note that: 274 + 727 = 364 + 637 = 1001 and 326734 + 673267 = 336634 + 663367 = 1000001.
Many numbers come in pairs, like: (286, 287), (1095, 1096), (18182, 18183) but also bigger number (140017877, 140017878) and (859982123, 859982124).
140017877 + 859982124 = 140017878 + 859982123 = 1000000001.

Examples

			155^3 = 3723875 and 155 = 3 - 723 + 875.
715^3 = 365525875 and 715 = 365 - 525 + 875.
		

Crossrefs

Programs

  • PARI
    isok(n)=nb = #digits(n, 10); if (a = n^3 \ 10^(2*nb), c = n^3 % 10^nb; b = (n^3 - a*10^(2*nb))\10^nb; n^3 == (a-b+c)^3;); \\ Michel Marcus, Aug 05 2015
  • Python
    def modb(n,m):
        kk = 0
        l = 1
        while n > 0:
            na = n % m
            l += 1
            kk += ((-1)**l) * na
            n //= m
        return kk
    for n in range (100, 10**9):
        ll = len(str(n))
        if modb(n**3, 10**ll) == n:
            print(n, end=', ') # corrected by David Radcliffe, May 09 2025
    

A368416 Numbers k whose decimal expansion can be split into two parts s and t with k = s^2 + t^2.

Original entry on oeis.org

101, 1233, 8833, 10100, 990100, 5882353, 94122353, 1765038125, 2584043776, 7416043776, 8235038125, 116788321168, 123288328768, 876712328768, 883212321168, 7681802663025, 8896802846976, 13793103448276, 15348303604525, 84651703604525, 86206903448276, 91103202846976
Offset: 1

Views

Author

A.H.M. Smeets, Dec 23 2023

Keywords

Comments

Inspired by the book "Getallentheorie - Een inleiding" from Frits Beukers, pp. 103, 104 (in Dutch).
Part t cannot begin with a 0 digit, so the split is k = s*10^length(t) + t.
For all terms except for a(1), the lengths of the parts are length(s) = floor(L/2) and length(t) = ceiling(L/2) where L = length(k).
Terms of the form (10^(8*(4*u+1)) + 1)/17 are a special case, being a(6) for u = 0, a(276) for u = 1, a(3102) for u = 2. These are the digits of 1/17 rounded up.
The corresponding right linear grammar for these is: S -> 123 T, T -> 2 8767 1232 8767 123 T | 3.
Most terms are either a starting point (u = 0) of an infinite list given by a regular language, or they occur later in this list of terms. Exceptions observed as standalone terms are a(1) = 101, a(4) = 10100 and a(5) = 990100.

Examples

			101 is a term since it can be split as 10^2 + 1^2 = 101. (This is so in any base.)
8833 is a term since it can be split as s=88 and t=33 with 88^2 + 33^2 = 8833.
		

References

  • Frits Beukers, "Getallen - Een inleiding" (In Dutch), Epsilon Uitgaven, Amsterdam (2015).

Crossrefs

Cf. A368417 (base 2).

Formula

List of examples of regular languages that are subsets of this sequence (leading zeros must be omitted, and ^ denotes repetition of digit block(s)):
{(1232 8767)^(2*u) 1233 | n >= 0}; a(2) for u = 0, a(55) for u = 1, a(232) for u = 2, a(960) for u = 3, a(1320) for u = 4, a(3889) for u = 5.
{(8767 1232)^(2*u+1) 8768 | n >= 0}; a(14) for u = 0, a(93) for u = 1, a(395) for u = 2, a(1086) for u = 3
{(8832 1167)^(2*u) 8833 | n >= 0}; a(3) for u = 0, a(65) for u = 1, a(257) for u = 2, a(964) for u = 3, a(1328) for u = 4, a(4033) for u = 5.
{(1167 8832)^(2*u+1) 1168 | n >= 0}; a(12) for u = 0, a(85) for u = 1, a(386) for u = 2, a(1046) for u = 3
{(1167 8832)^(4*u+3) 1167 8833 | n >= 0}; a(230) for u = 0, a(1319) for u = 1
{(05882352 99117647)^(2*u) 05882353 | n >= 0}; a(6) for u = 0, a(276) for u = 1, a(3102) for u = 2.
{(94122352 05877647)^(2*u) 94122353 | n >= 0}; a(7) for u = 0, a(280) for u = 1, a(3122) for u = 2.
{(05877647 94122352)^(2*u+1) 05877648 | n >= 0}; a(76) for u = 0, a(1003) for u = 1, a(4067) for u = 2.
{(1765038124 8234961875)^(2*u) 1765038125 | n >= 0}; a(8) for u = 0, a(878) for u = 1, a(4493) for u = 2.
{(8234961875 1765038124)^(2*u+1) 8234961876 | n >= 0}; a(177) for u = 0, a(2672) for u = 1
{(2584043775 7415956224)^(2*u) 2584043776 | n >= 0}; a(9) for u = 0, a(886) for u = 1, a(4618) for u = 2.
{(7415956224 2584043775)^(2*u+1) 7415956225 | n >= 0}; a(170) for u = 0, a(2537) for u = 1.
{(7416043775 2583956224)^(2*u) 7416043776 | n >= 0}; a(10) for u = 0, a(924) for u = 1, a(5290) for u = 2.
{(2583956224 7416043775)^(2*u+1) 2583956225 | n >= 0}; a(126) for u = 0, a(1890) for u = 1.
{(8235038124 1764961875)^(2*u) 8235038125 | n >= 0}; a(11) for u = 0, a(932) for u = 1, a(5415) for u = 2.
{(1764961875 8235038124)^(2*u+1) 1764961876 | n >= 0}; a(119) for u = 0, a(1755) for u = 1.
{(123288328767 876711671232)^(2*u) 123288328768 | n >= 0}; a(13) for u = 0, a(1050) for u = 1.
{(876711671232 123288328767)^(2*u+1) 876711671233 | n >= 0}; a(254) for u = 0, a(4030) for u = 1.
{(1091314031180400 8908685968819599)^(2*u) 1091314031180401 | n >= 0}; a(30) for u = 0, a(3484) for u = 1.
{(2913840045440000 7086159954559999)^(2*u) 2913840045440001 | n >= 0}; a(34) for u = 0, a(3557) for u = 1.

A178530 Numbers k with the property that there exist nonnegative integers a and b such that k = concat(a,b) = a^2+b^2.

Original entry on oeis.org

0, 1, 100, 101, 1233, 8833, 10100, 990100, 5882353, 94122353, 1765038125, 2584043776, 7416043776, 8235038125, 116788321168, 123288328768, 876712328768, 883212321168, 7681802663025, 8896802846976, 13793103448276, 15348303604525, 84651703604525, 86206903448276, 91103202846976, 92318202663025, 106058810243728
Offset: 1

Views

Author

Karsten Meyer, Dec 23 2010

Keywords

Comments

The sum of two numbers a1 and a2 that share a common b has the form of 10^j. Example: 12 + 88 = 100
The ordered pair of the final digit of a and b is always one of (0,0), (0,1), (0,5), (0,6), (2,3), (8,3), (2,8), or (8,8).
If b has k decimal digits, then (2a - 10^k)^2 + (2b - 1)^2 = 10^(2k) + 1 giving a way for efficient computation of many terms. - Max Alekseyev, Aug 17 2013

Examples

			0 = 0^2+0^2 [this seems a bit far-fetched. - _N. J. A. Sloane_, Dec 23 2010]
1=0^2+1^2 [ditto]
100=10^2+0^2.
101=10^2+1^2.
1233=12^2+33^2.
		

Crossrefs

See A055616, A064942, A101311 for closely related sequences.

Programs

  • Mathematica
    Sort[Reap[Do[n=a^2+b^2; If[n==FromDigits[Join[IntegerDigits[a], IntegerDigits[b]]], Sow[n]], {a,0, 1000}, {b, 0, 1000}]][[2, 1]]]

Extensions

Edited by N. J. A. Sloane, Dec 23 2010
a(11)-a(14) from Nathaniel Johnston, Jan 03 2011
Terms a(15) onward from Max Alekseyev, Aug 17 2013

A260193 Numbers k of the form abs(a - b + c - d) such that k^4 equals the concatenation of a//b//c//d and numbers k,b,c,d have the same number of digits.

Original entry on oeis.org

198, 220, 221, 287, 352, 364, 484, 562, 627, 638, 672, 715, 716, 780, 793, 858, 901, 1095, 1233, 2328, 8905, 18183, 39753, 60248, 85207, 336734, 2727274, 5893504, 8620777, 17769557, 52818678, 70710735, 76470590, 82230444, 101318734, 101636206, 104263158, 105262158, 109891110, 109942690, 117883117, 119722383, 120826541
Offset: 1

Views

Author

Pieter Post, Jul 22 2015

Keywords

Comments

Leading zeros in b, c, and d are allowed.
Many numbers come in pairs, like: (220, 221), (715, 716), (140017877, 140017878).
Some numbers are also member of A259379, for example: 287, 715, 1095 and also the pair (140017877, 140017878).

Examples

			198^4 = 1536953616 and 198 = abs (1 - 536 + 953 - 616 ).
8905^4 = 6288335365950625 and 8905 = abs (6288 - 3353 + 6595 - 0625 ).
		

Crossrefs

Programs

  • Mathematica
    test[n_] := Block[{L=IntegerLength@ n, v}, v = IntegerDigits[ n^4, 10^L]; Length@ v == 4 && Abs@ Total[ {1, -1, 1, -1} v] == n]; Select[Range[10^5], test] (* Giovanni Resta, Aug 12 2015 *)
  • Python
    def modb(n, m):
        kk = 0
        l = 1
        while n > 0:
            na = n % m
            l += 1
            kk += ((-1)**l) * na
            n //= m
        return abs(kk)
    for n in range (100, 10**9):
        ll = len(str(n))
        if modb(n**4, 10**ll) == n and n**4 >= 10**(ll*3):
             print (n, end=', ') # corrected by David Radcliffe, May 09 2025
Showing 1-6 of 6 results.