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.

User: Giorgos Kalogeropoulos

Giorgos Kalogeropoulos's wiki page.

Giorgos Kalogeropoulos has authored 106 sequences. Here are the ten most recent ones:

A383907 Echo primes: primes p such that the greatest prime factor of p-1 is a suffix of p.

Original entry on oeis.org

13, 73, 127, 163, 193, 197, 313, 337, 419, 433, 757, 929, 1153, 2017, 2311, 2593, 2647, 3137, 3659, 4483, 4673, 5741, 6857, 7057, 12071, 12097, 13267, 13313, 13619, 14407, 15877, 17191, 18041, 18433, 18439, 19273, 19531, 20353, 21319, 21961, 22279, 24103, 24697, 25411
Offset: 1

Author

Giorgos Kalogeropoulos, May 15 2025

Keywords

Comments

These are primes in A383896(n).
The first pair of twin echo primes is 6467806769 and 6467806771.
Conjecture: There are infinitely many echo primes.

Crossrefs

Programs

  • Mathematica
    Select[Prime@Range@3000,(f=FactorInteger[#-1][[-1,1]]; Mod[#,10^IntegerLength@f]==f)&]
  • Python
    from sympy import factorint, isprime
    def ok(n): return n > 2 and isprime(n) and str(n).endswith(str(max(factorint(n-1))))
    print([k for k in range(30000) if ok(k)]) # Michael S. Branicky, May 15 2025

A383896 Echo numbers: positive integers k such that the largest prime factor of k-1 is a suffix of k.

Original entry on oeis.org

13, 57, 73, 111, 127, 163, 193, 197, 313, 323, 337, 419, 433, 687, 757, 817, 847, 897, 929, 931, 973, 1037, 1153, 1177, 1211, 1641, 2017, 2311, 2593, 2623, 2647, 2913, 3073, 3137, 3659, 3661, 3829, 4031, 4117, 4213, 4453, 4483, 4537, 4673, 4737, 4971, 5377, 5741
Offset: 1

Author

Giorgos Kalogeropoulos, May 14 2025

Keywords

Comments

They are called like that because k-1 leaves an echo in the decimal representation of k.
There are infinitely many terms: 56^i+1 is a term for i > 0.
No term may be even, since if k were even, then k-1 would be odd and have only odd prime factors, none of which could be a suffix of k. - Michael S. Branicky, May 14 2025

Examples

			k = 4971 is an echo number because k-1 = 4970 = 2*5*7*71 and k ends in 71.
		

Crossrefs

Cf. A006530.
Cf. A383296 (primorial base analog), A383927 (binary analog).

Programs

  • Maple
    filter:= proc(n) local p;
      p:= max(numtheory:-factorset(n-1));
      n - p mod 10^(1+ilog10(p)) = 0
    end proc:
    select(filter, [seq(i,i=11..10000,2)]); # Robert Israel, May 14 2025
  • Mathematica
    Select[Range[2,6000],(f=FactorInteger[#-1][[-1,1]];Mod[#,10^IntegerLength@f]==f)&]
  • PARI
    isok(k) = if (k>2, my(x = vecmax(factor(k-1)[,1]), m = 1+logint(x, 10)); k % 10^m == x); \\ Michel Marcus, May 14 2025
  • Python
    from sympy import factorint
    def ok(n): return n > 2 and str(n).endswith(str(max(factorint(n-1))))
    print([k for k in range(6000) if ok(k)]) # Michael S. Branicky, May 14 2025
    

A383485 a(n) = 2*(2*(n - 1)! + n + 2) (mod n*(n + 2)).

Original entry on oeis.org

1, 4, 3, 12, 5, 16, 0, 20, 31, 24, 11, 28, 0, 32, 49, 36, 17, 40, 0, 44, 67, 48, 0, 52, 54, 56, 85, 60, 29, 64, 0, 68, 70, 72, 109, 76, 0, 80, 121, 84, 41, 88, 0, 92, 139, 96, 0, 100, 102, 104, 157, 108, 0, 112, 114, 116, 175, 120, 59, 124, 0, 128, 130, 132, 199, 136, 0, 140
Offset: 1

Author

Giorgos Kalogeropoulos, Apr 28 2025

Keywords

Comments

Fixed points are the lesser of twin primes A001359.
Positions of zeros are primes p such that p + 2 is not a prime A067774.

Crossrefs

Programs

  • Mathematica
    Table[Mod[2(2(n - 1)! + n + 2), n(n + 2)], {n, 68}]

Formula

a(A001359(n)) = n.
a(A067774(n)) = 0.

A380714 a(n) = n*(n-1) mod (10^m-1) where m is the number of decimal digits in n.

Original entry on oeis.org

0, 2, 6, 3, 2, 3, 6, 2, 0, 90, 11, 33, 57, 83, 12, 42, 74, 9, 45, 83, 24, 66, 11, 57, 6, 56, 9, 63, 20, 78, 39, 2, 66, 33, 2, 72, 45, 20, 96, 75, 56, 39, 24, 11, 0, 90, 83, 78, 75, 74, 75, 78, 83, 90, 0, 11, 24, 39, 56, 75, 96, 20, 45, 72, 2, 33, 66
Offset: 1

Author

Giorgos Kalogeropoulos, Mar 27 2025

Keywords

Comments

a(n) = 0 if and only if n is a Kaprekar number (A053816).

Crossrefs

Programs

  • Maple
    a:= n-> n*(n-1) mod (10^length(n)-1):
    seq(a(n), n=1..67);  # Alois P. Heinz, Mar 27 2025
  • Mathematica
    Table[Mod[n(n-1), 10^IntegerLength@n - 1], {n,67}]
  • Python
    def a(n): return n*(n-1)%(10**len(str(n))-1)
    print([a(n) for n in range(1, 68)]) # Michael S. Branicky, Mar 27 2025

Formula

a(n) = A002378(n-1) mod A002283(A055642(n)).

A380585 a(n) = floor(n^2 / 10^m) + (n^2 mod 10^m) where m is the number of decimal digits in n.

Original entry on oeis.org

0, 1, 4, 9, 7, 7, 9, 13, 10, 9, 1, 22, 45, 70, 97, 27, 58, 91, 27, 64, 4, 45, 88, 34, 81, 31, 82, 36, 91, 49, 9, 70, 34, 99, 67, 37, 108, 82, 58, 36, 16, 97, 81, 67, 55, 45, 37, 31, 27, 25, 25, 27, 31, 37, 45, 55, 67, 81, 97, 115, 36, 58, 82, 108, 136, 67, 99
Offset: 0

Author

Giorgos Kalogeropoulos, Mar 27 2025

Keywords

Comments

The positive fixed points of this sequence are the Kaprekar numbers (A053816).
The sum of two halves of the decimal expansion of n^2 after having added a leading 0 if that number of digits is odd. - Michel Marcus, Mar 28 2025

Crossrefs

Cf. A053816 (fixed points), A055642, A344851, A358072 (similar plot).

Programs

  • Maple
    a:= n-> (k-> iquo(n^2, k)+(n^2 mod k))(10^length(n)):
    seq(a(n), n=0..66);  # Alois P. Heinz, Mar 27 2025
  • Mathematica
    Table[m=IntegerLength@n; Floor[n^2/10^m] + Mod[n^2,10^m], {n,0,66}]
  • PARI
    a(n) = my(d=digits(n^2)); if (#d % 2, d = concat(0, d)); my(m=#d/2); fromdigits(Vec(d,m)) + fromdigits(vector(#d-m, i, d[m+i])); /* Michel Marcus, Mar 28 2025 */
  • Python
    def a(n): return (nn:=n**2)//(M:=10**len(str(n))) + nn%M
    print([a(n) for n in range(0, 67)]) # Michael S. Branicky, Mar 27 2025
    

A381924 Multiplicative order of n mod prime(n).

Original entry on oeis.org

1, 2, 4, 3, 5, 12, 16, 6, 11, 28, 30, 9, 40, 21, 46, 13, 29, 60, 33, 7, 24, 13, 41, 88, 48, 100, 34, 106, 54, 7, 63, 26, 136, 23, 74, 75, 39, 9, 166, 86, 178, 5, 95, 192, 196, 99, 105, 222, 113, 228, 29, 34, 120, 250, 256, 262, 67, 270, 46, 8, 47, 292, 153, 155, 312
Offset: 1

Author

Giorgos Kalogeropoulos, Mar 12 2025

Keywords

Comments

a(n) is the least k such that prime(n) divides n^k-1.

Examples

			a(12) = 9 because the multiplicative order of 12 mod prime(12) is 9.
		

Crossrefs

Cf. A226295, A014664, A091185 (n^(-1) mod prime(n)).

Programs

  • Magma
    [Order(n, NthPrime(n)) : n in [1..65]]; // Vincenzo Librandi, Mar 25 2025
  • Mathematica
    Table[MultiplicativeOrder[n,Prime[n]],{n,65}]
  • PARI
    a(n) = znorder(Mod(n, prime(n))); \\ Michel Marcus, Mar 12 2025
    

Formula

If n is a primitive root modulo prime(n), a(n) = prime(n) - 1.

A381969 Primes p with the property that PreviousPrime(p) is a substring of p^2.

Original entry on oeis.org

3701, 65442077, 8410957371097
Offset: 1

Author

Giorgos Kalogeropoulos, Mar 11 2025

Keywords

Comments

a(4) <= 39835421121719177570419.
p = 1410901659681109388941762308365764228483 is also a member of this sequence and it is the only known term that is the greater of a twin prime pair.

Examples

			3701 is a term because PreviousPrime(3701) = 3697 is a substring of 3701^2 = 13697401.
		

Crossrefs

Cf. A052073.

Programs

  • Mathematica
    Select[Prime@Range[10^4],StringContainsQ[ToString[#^2],ToString[NextPrime[#,-1]]]&]

A380787 Odd positive integers k whose continued fraction for sqrt(k) has a central term equal to either floor(sqrt(k)) or floor(sqrt(k)) - 1.

Original entry on oeis.org

3, 7, 11, 19, 23, 27, 31, 43, 47, 51, 59, 67, 71, 79, 83, 103, 107, 119, 123, 127, 131, 139, 151, 163, 167, 171, 179, 187, 191, 199, 211, 223, 227, 239, 243, 251, 263, 267, 271, 283, 287, 291, 307, 311, 331, 339, 343, 347, 359, 363, 367, 379, 383, 387, 391
Offset: 1

Author

Giorgos Kalogeropoulos, Feb 03 2025

Keywords

Comments

Conjecture: All terms are congruent to 3 mod 4 and all primes of this form (A002145) are terms of the sequence.

Examples

			71 is a term because the central element of CF(sqrt(71)) = [8; 2, 2, 1, 7, 1, 2, 2, 16] is 7 and floor(sqrt(71)) - 1 = 7.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,v;
      if issqr(n) then return false fi;
      L:= map(op, numtheory:-cfrac(sqrt(n),periodic,quotients));
      if nops(L)::even then return false fi;
      v:=L[(1+nops(L))/2]-floor(sqrt(n));
      v = 0 or v = -1
    end proc:
    select(filter, [seq(i,i=1..500,2); # Robert Israel, Mar 03 2025
  • Mathematica
    Select[2Range@200+1,(l=Last@ContinuedFraction@Sqrt[#]; m=l[[Floor[Length@l/2]]];m==Floor@Sqrt@#||m==Floor@Sqrt@#-1)&]

A373117 Stable numbers on vertical blade (see the Example section for an explanation).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 22, 30, 33, 40, 44, 50, 55, 60, 66, 70, 77, 80, 88, 90, 99, 100, 101, 102, 110, 111, 113, 121, 124, 131, 135, 141, 146, 151, 157, 161, 168, 171, 179, 181, 191, 200, 201, 202, 204, 212, 215, 220, 222, 226, 232, 237, 242, 248, 252, 259, 262, 272, 282, 292, 300, 303, 306, 311
Offset: 1

Author

Keywords

Examples

			We place the k digits of a number in succession in k adjacent square boxes forming a rectangle of base k and height 1. We can only place a vertical blade under this rectangle in two ways: exactly between two boxes [positions (a) and (d) below] or exactly under the middle of a box [position (b) and (c) below].
If the blade is placed in position (a) between the two 1s of 11, the number 11 is stable.
If the blade is placed in (b) exactly under the 0 of 101, the number 101 is stable.
If the blade is placed in (c) exactly under the 1 of 10, the number is stable.
If the blade is placed in (d) between the 0 and the 2 of 102, the number 102 is stable.
For the last two examples, the balance of the number considered can be explained as follows: the distance which separates a digit from the blade comes into play - the more this distance increases, the heavier the digit in question is. So, the digit 1 of 102 weighs 2 in reality (weight*distance = 1*2 = 2). This quantity balances the influence of the 2 of 102 (for which weight*distance = 2*1 = 2 too).
.
.+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
.|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
.+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
.|   | 1 | 1 |   | 1 | 0 | 1 |   | 1 | 0 |   | 1 | 0 | 2 |   |
.+---+---a---+---+---+-b-+---+---+-c-+---+---+---+---d---+---+
.|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
.+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
.
		

Crossrefs

A372408 a(n) = smallest composite not occurring earlier having in decimal representation to its predecessor Levenshtein distance = 1; a(1)=1.

Original entry on oeis.org

1, 4, 6, 8, 9, 39, 30, 10, 12, 14, 15, 16, 18, 28, 20, 21, 22, 24, 25, 26, 27, 57, 50, 40, 42, 32, 33, 34, 35, 36, 38, 48, 44, 45, 46, 49, 69, 60, 62, 52, 51, 54, 55, 56, 58, 68, 63, 64, 65, 66, 76, 70, 72, 74, 75, 77, 78, 88, 80, 81, 82, 84, 85, 86, 87, 187, 117, 110, 100, 102, 104, 105, 106, 108, 118, 111, 112
Offset: 1

Author

Keywords

Comments

The sequence is a permutation of the nonprimes.

Examples

			The Levenshtein distance = 1 between 1 and 4, 4 and 6, 6 and 8, 8 and 9, 9 and 39, 39 and 30, 30 and 10, etc.
No smaller composite than 39 was possible for a(6).
		

Crossrefs

Programs

  • Mathematica
    a[1]=1;a[n_]:=a[n]=(k=2;While[PrimeQ@k||MemberQ[Array[a,n-1],k]|| EditDistance[ToString@k,ToString@a[n-1]]!=1,k++];k);Array[a,77]
  • Python
    from sympy import isprime
    from itertools import islice
    from Levenshtein import distance as Ld
    def agen(): # generator of terms
        an, aset, mink = 1, {1}, 4
        while True:
            yield an
            s, k = str(an), mink
            while k in aset or Ld(s, str(k)) != 1 or isprime(k): k += 1
            an = k
            aset.add(k)
            while mink in aset or isprime(mink): mink += 1
    print(list(islice(agen(), 80))) # Michael S. Branicky, Apr 29 2024