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.

This page as a plain text file.
%I A062845 #95 Sep 08 2022 08:45:03
%S A062845 0,1,5,6,10,12,30,36,60,120,180,215,216,252,360,430,432,1080,2730,
%T A062845 3276,13710,14724,16380,20520,24624,24840,27125,27420,32760,38880,
%U A062845 48606,49091,54250,54840,97212,98280
%N A062845 When expressed in base 2 and then interpreted in base 3, is a multiple of the original number.
%C A062845 The numbers 2*m, 4*m and 8*m are also terms of the sequence for m=a(122). - _Dimiter Skordev_, Mar 29 2020
%H A062845 Dimiter Skordev, <a href="/A062845/b062845.txt">Table of n, a(n) for n = 1..122</a> (terms < 10^15, terms 1..36 from Erich Friedman, 37..111 from Dimiter Skordev, 112..120 from Giovanni Resta)
%H A062845 Dimiter Skordev, <a href="/A062845/a062845_1.pas.txt">Pascal program</a>
%H A062845 Dimiter Skordev, <a href="/A062845/a062845_1.py.txt">Python script</a>
%e A062845 30 = 11110_2; 11110_3 = 120 = 4*30.
%t A062845 {0} ~Join~ Select[Range[10^5], Mod[ FromDigits[ IntegerDigits[#, 2], 3], #] == 0 &] (* _Giovanni Resta_, Dec 10 2019 *)
%o A062845 (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
%o A062845 (PARI) isok(m) = (m==0) || fromdigits(digits(m, 2), 3) % m == 0; \\ _Michel Marcus_, Feb 15 2020
%o A062845 (Python)
%o A062845 def BaseUp(n,b):
%o A062845     up, b1 = 0, 1
%o A062845     while n > 0:
%o A062845         up, b1, n = up+(n%b)*b1, b1*(b+1), n//b
%o A062845     return up
%o A062845 n, k = 1, 0
%o A062845 print(1,0)
%o A062845 while n < 35:
%o A062845     n, k = n+1, k+1
%o A062845     while BaseUp(k,2)%k != 0:
%o A062845         k = k+1
%o A062845     print(n,k) # _A.H.M. Smeets_, Mar 31 2020
%Y A062845 Cf. A062846, A062847, A062848, A062849, A062850, A032533, A062853.
%Y A062845 Cf. A005836.
%K A062845 base,nonn
%O A062845 1,3
%A A062845 _Erich Friedman_, Jul 21 2001