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.

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

A343536 Positive numbers k such that the decimal expansion of k^2 appears in the concatenation of the first k positive integers.

Original entry on oeis.org

1, 428, 573, 725, 727, 738, 846, 7810, 8093, 28023, 36354, 36365, 36464, 63636, 254544, 277851, 297422, 326734, 673267, 673368, 2889810, 4545454, 4545465, 5454547, 5454646, 24275425, 29411775, 47058823, 52941178, 94117748, 146407310, 263157795, 267735365, 285714186
Offset: 1

Views

Author

John R Phelan, Apr 18 2021

Keywords

Comments

A030467 is a subsequence. - Chai Wah Wu, Jun 07 2021

Examples

			428^2 = 183184, which appears in the concatenation of the first 428 positive integers at 183,184, i.e., (183184), so 428 is a term.
725^2 = 525625, which appears in the concatenation of the first 725 positive integers at 255,256,257, i.e., 25(525625)7, so 725 is a term.
		

Crossrefs

Programs

  • Java
    public class Oeis2 {
        public static void main(String[] args) {
            StringBuilder str = new StringBuilder();
            long n = 1;
            while (true) {
                str.append(n);
                if (str.indexOf(String.valueOf(n * n)) >= 0) {
                    System.out.print(n + ", ");
                }
                n++;
            }
        }
    }
    
  • Mathematica
    Select[Range@1000,StringContainsQ[""<>ToString/@Range@#,ToString[#^2]]&] (* Giorgos Kalogeropoulos, Apr 24 2021 *)
    Select[Range[68*10^4],SequenceCount[Flatten[IntegerDigits/@Range[#]],IntegerDigits[#^2]]>0&] (* The program generates the first 20 terms of the sequence. *) (* Harvey P. Dale, Jul 06 2025 *)
  • PARI
    f(n) = my(s=""); for(k=1, n, s=Str(s, k)); s; \\ from A007908
    isok(k) = #strsplit(f(k), Str(k^2)) > 1; \\ Michel Marcus, May 02 2021
    
  • Python
    A343536_list, k, s = [], 1, '1'
    while k < 10**6:
        if str(k**2) in s:
            A343536_list.append(k)
        k += 1
        s += str(k) # Chai Wah Wu, Jun 06 2021

Extensions

More terms from Jinyuan Wang, Apr 30 2021
Showing 1-2 of 2 results.