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.

A062845 When expressed in base 2 and then interpreted in base 3, is a multiple of the original number.

Original entry on oeis.org

0, 1, 5, 6, 10, 12, 30, 36, 60, 120, 180, 215, 216, 252, 360, 430, 432, 1080, 2730, 3276, 13710, 14724, 16380, 20520, 24624, 24840, 27125, 27420, 32760, 38880, 48606, 49091, 54250, 54840, 97212, 98280
Offset: 1

Views

Author

Erich Friedman, Jul 21 2001

Keywords

Comments

The numbers 2*m, 4*m and 8*m are also terms of the sequence for m=a(122). - Dimiter Skordev, Mar 29 2020

Examples

			30 = 11110_2; 11110_3 = 120 = 4*30.
		

Crossrefs

Programs

  • Magma
    [0] cat [k:k in [1..100000]|Seqint(Intseq(Seqint(Intseq(k, 2))),3) mod k eq 0]; // Marius A. Burtea, Dec 29 2019
    
  • Mathematica
    {0} ~Join~ Select[Range[10^5], Mod[ FromDigits[ IntegerDigits[#, 2], 3], #] == 0 &] (* Giovanni Resta, Dec 10 2019 *)
  • PARI
    isok(m) = (m==0) || fromdigits(digits(m, 2), 3) % m == 0; \\ Michel Marcus, Feb 15 2020
    
  • Python
    def BaseUp(n,b):
        up, b1 = 0, 1
        while n > 0:
            up, b1, n = up+(n%b)*b1, b1*(b+1), n//b
        return up
    n, k = 1, 0
    print(1,0)
    while n < 35:
        n, k = n+1, k+1
        while BaseUp(k,2)%k != 0:
            k = k+1
        print(n,k) # A.H.M. Smeets, Mar 31 2020