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: Vighnesh Patil

Vighnesh Patil's wiki page.

Vighnesh Patil has authored 3 sequences.

A385660 Numbers k such that prime(k+1)-prime(k) divides k.

Original entry on oeis.org

1, 2, 4, 8, 10, 12, 18, 20, 24, 26, 28, 36, 44, 48, 52, 54, 60, 64, 72, 80, 84, 88, 96, 98, 102, 104, 108, 112, 116, 120, 128, 136, 140, 142, 144, 148, 152, 168, 174, 176, 178, 180, 182, 190, 192, 206, 210, 212, 216, 224, 230, 234, 236, 240, 244, 248, 252, 256, 262, 264, 268, 276, 286, 288, 294
Offset: 1

Author

Vighnesh Patil, Jul 06 2025

Keywords

Examples

			k = 18 is a term since prime(19) - prime(18) = 6 divides 18.
		

Crossrefs

Programs

  • Mathematica
    q[k_] := Divisible[k, Prime[k + 1] - Prime[k]]; Select[Range[300], q] (* Amiram Eldar, Jul 09 2025 *)
  • Python
    from sympy import prime
    def ok(k): return k % (prime(k+1) - prime(k)) == 0
    print([k for k in range(1, 300) if ok(k)])

A385656 Numbers k such that the sum of the decimal digits of k^2 divides k^2.

Original entry on oeis.org

1, 2, 3, 6, 9, 10, 12, 15, 18, 20, 21, 24, 30, 36, 39, 42, 45, 48, 49, 51, 52, 54, 60, 63, 65, 66, 68, 72, 78, 80, 84, 88, 90, 96, 100, 102, 104, 105, 108, 110, 111, 112, 117, 120, 126, 132, 138, 140, 144, 148, 150, 156, 162, 168, 174, 180, 182, 190, 198, 200, 201, 204, 207
Offset: 1

Author

Vighnesh Patil, Jul 06 2025

Keywords

Examples

			15 is a term 15^2 = 225; digit sum of 225 = 2 + 2 + 5 = 9; 225 mod 9 = 0, so 15 is included.
18 is a term 18^2 = 324; digit sum of 324 = 3 + 2 + 4 = 9; 324 mod 9 = 0, so 16 is included.
		

Crossrefs

Programs

  • Maple
    digitSum := n -> add(i,i=convert(n, base, 10)):
    isok := n -> modp(n^2, digitSum(n^2)) = 0:
    select(isok, [$1..400])[];
  • Mathematica
    DigitSum[n_] := Total[IntegerDigits[n]];
    Select[Range[400], Mod[#^2, DigitSum[#^2]] == 0 &]
  • PARI
    isok(k) = (k^2 % sumdigits(k^2)) == 0; \\ Michel Marcus, Jul 06 2025
  • Python
    def digit_sum(n): return sum(int(d) for d in str(n))
    def ok(n): return (n**2) % digit_sum(n**2) == 0
    print([n for n in range(1, 1000) if ok(n)])
    

Formula

a(n) = sqrt(A118547(n)). - Michel Marcus, Jul 07 2025

A385640 Numbers k such that the sum of the digits of k divides k and the sum of the digits of k^2 divides k^2.

Original entry on oeis.org

1, 2, 3, 6, 9, 10, 12, 18, 20, 21, 24, 30, 36, 42, 45, 48, 54, 60, 63, 72, 80, 84, 90, 100, 102, 108, 110, 111, 112, 117, 120, 126, 132, 140, 144, 150, 156, 162, 180, 190, 198, 200, 201, 204, 207, 210, 216, 220, 234, 240, 243, 252, 264, 270, 288, 300, 306, 315
Offset: 1

Author

Vighnesh Patil, Jul 05 2025

Keywords

Comments

If k is in the sequence then so is 10*k. - David A. Corneth, Jul 06 2025

Examples

			18 is a term since 1+8 = 9 and 18 mod 9 = 0; also, 18^2 = 324, and 3+2+4 = 9 and 324 mod 9 = 0.
		

Crossrefs

Intersection of A005349 and A385656.
Cf. A007953.

Programs

  • Mathematica
    A385640Q[k_] :=  Divisible[k, DigitSum[k]] && Divisible[k^2, DigitSum[k^2]];
    Select[Range[500], A385640Q] (* Paolo Xausa, Jul 06 2025 *)
  • Python
    def digit_sum(n): return sum(int(d) for d in str(n))
    def ok(n):
        return n % digit_sum(n) == 0 and (n**2) % digit_sum(n**2) == 0
    print([n for n in range(1, 400) if ok(n)])

Formula

A005349(a(n)) | a(n) and A005349(a(n)^2) | a(n)^2.
{k | k in A005349 and k^2 in A005349}. - Michael S. Branicky, Jul 05 2025