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

A292788 For n > 1, a(n) = least positive k, not a power of n, such that the digital sum of k in base n equals the digital sum of k^3 in base n.

Original entry on oeis.org

56953, 13, 2, 3, 20, 2, 6, 3, 8, 5, 1110, 3, 65, 8, 4, 7, 86, 9, 2374, 4, 8, 12, 114, 3, 99, 12, 135, 15, 3567, 4, 185, 15, 11, 16, 6, 19, 73, 20, 12, 5, 81, 6, 85, 23, 19, 24, 93, 7, 97, 24, 18, 27, 796, 28, 44, 7, 19, 28, 413, 4, 365, 32, 8, 31, 26, 21, 200
Offset: 2

Views

Author

Rémy Sigrist, Sep 23 2017

Keywords

Comments

The term a(10) = 8 belongs to A070276.
For any n > 1, a(n^2) <= n.
Is this sequence defined for any n > 1 ?
Apparently, a(k) < k for any odd k > 3.
Among the first 99 999 terms, the digital sum of a(n) in base n is > n for n = 2, 12, 20, 30.
The scatterplot of the sequence shows beams on the upper part, which correspond to clusters of close points for which a(n) = k*n + (n-k-e) for some k > 0 and e in { 0, 2 }.
See also A292787 for a similar sequence involving squares instead of cubes.
The least positive k, not a power of 2, such that the hamming weight of k equals the hamming weight of k^4 is 34225258495.

Examples

			For n = 3:
- let d_3 denote the digital sum in base 3 (d_3 = A053735),
- 1 is a power of 3,
- d_3(2) = 2 and d_3(2^3) = 4,
- 3 is a power of 3,
- d_3(4) = 2 and d_3(4^3) = 4,
- d_3(5) = 3 and d_3(5^3) = 7,
- d_3(6) = 2 and d_3(6^3) = 4,
- d_3(7) = 3 and d_3(7^3) = 5,
- d_3(8) = 4 and d_3(8^3) = 8,
- 9 is a power of 3,
- d_3(10) = 2 and d_3(10^3) = 4,
- d_3(11) = 3 and d_3(11^3) = 9,
- d_3(12) = 2 and d_3(12^3) = 4,
- d_3(13) = 3 and d_3(13^3) = 3,
- hence a(3) = 13.
		

Crossrefs

Programs

  • Mathematica
    With[{kk = 10^5}, Table[SelectFirst[Complement[Range[2, kk], n^Range@ Floor@ Log[n, kk]], Total@ IntegerDigits[#, n] == Total@ IntegerDigits[#^3, n] &] /. k_ /; MissingQ@ k -> -1, {n, 2, 68}]] (* Michael De Vlieger, Sep 24 2017 *)
  • PARI
    a(n) = my (p=1); for (k=1, oo, if (k==p, p*=n, if (sumdigits(k,n) == sumdigits(k^3,n), return (k))))

A292832 a(n) is the least positive k, not a power of 2, such that the Hamming weight of k equals the Hamming weight of k^n, or 0 if no such k exists.

Original entry on oeis.org

3, 3, 56953, 34225258495
Offset: 1

Views

Author

Rémy Sigrist, Sep 24 2017

Keywords

Comments

The Hamming weight of a number n is given by A000120(n).
Is this sequence positive for every positive integer?
a(2) = A292787(2).
a(3) = A292788(2).

Examples

			For n = 2:
- 1 is a power of 2,
- 2 is a power of 2,
- A000120(3) = 2 and A000120(3^2) = 2,
- hence a(2) = 3.
		

Crossrefs

Programs

  • PARI
    a(n) = forstep(k=3, oo, 2, if (hammingweight(k) == hammingweight(k^n), return (k)))

A321366 a(n) is the least integer k greater than 1 such that n divides binomial(k, 2) = A000217(k-1).

Original entry on oeis.org

2, 4, 3, 8, 5, 4, 7, 16, 9, 5, 11, 9, 13, 8, 6, 32, 17, 9, 19, 16, 7, 12, 23, 16, 25, 13, 27, 8, 29, 16, 31, 64, 12, 17, 15, 9, 37, 20, 13, 16, 41, 21, 43, 33, 10, 24, 47, 33, 49, 25, 18, 40, 53, 28, 11, 49, 19, 29, 59, 16, 61, 32, 28, 128, 26
Offset: 1

Views

Author

Kevin Long, Aug 27 2019

Keywords

Crossrefs

Programs

  • PARI
    a(n) = {my(s=1, k=2); while(s%n, s+=k; k++); k} \\ Andrew Howroyd, Aug 27 2019
    (Python 3.8+)
    from itertools import combinations
    from math import prod
    from sympy import factorint, divisors
    from sympy.ntheory.modular import crt
    def A321366(n):
        plist = [p**q for p, q in factorint(2*n).items()]
        if len(plist) == 1:
            return int((2 - plist[0] % 2)*n)
        return 1+int(min(min(crt([m,2*n//m],[0,-1])[0],crt([2*n//m,m],[0,-1])[0]) for m in (prod(d) for l in range(1,len(plist)//2+1) for d in combinations(plist,l)))) # Chai Wah Wu, Jun 03 2021

Formula

a(n) = A011772(n) + 1.
a(2^n) = 2^(n+1).
a(p^n) = p^n for odd primes p.
Showing 1-3 of 3 results.