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

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

A162701 Numbers k which are concatenations k = x//y such that x^2 - y^2 is a multiple of k.

Original entry on oeis.org

147, 528, 729, 1617, 8019, 13467, 71289, 91091, 130896, 310497, 350268, 970299, 1010100, 1016127, 1034187, 1140399, 1190475, 1216512, 1300624, 1334667, 1360167, 1416767, 1484847, 1530900, 2020200, 2032254, 2068374, 2280798
Offset: 1

Views

Author

Claudio Meller, Jul 11 2009

Keywords

Comments

Cases in which y has leading zeros or y >= x are not considered.

Examples

			147 = 14//7, 14^2 - 7^2 = 1*147;
528 = 52//8, 52^2 - 8^2 = 5*528;
729 = 72//9, 72^2 - 9^2 = 7*729.
		

Crossrefs

Cf. A162700.

Programs

  • Maple
    Lton := proc(L) add( op(i,L)*10^(i-1),i=1..nops(L)) ; end:
    for n from 10 do dgs := convert(n,base,10) ; for spli from 1 to nops(dgs)-1 do ydgs := [op(1..spli,dgs)] ; xdgs := [op(spli+1..nops(dgs),dgs)] ;
    if op(-1,ydgs) <> 0 then x := Lton(xdgs) ; y := Lton(ydgs) ; if x > y then if (x^2-y^2) mod n = 0 then print(n) ; fi; fi; fi;
    od: od: # R. J. Mathar, Jul 16 2009

Extensions

keyword:base added, definition rephrased, 3 terms added by R. J. Mathar, Jul 16 2009
More terms from Sean A. Irvine, Apr 15 2010
Showing 1-2 of 2 results.