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.

A225837 Numbers of form 2^i*3^j*(6k+1), i, j, k >= 0.

This page as a plain text file.
%I A225837 #37 Feb 02 2025 19:31:29
%S A225837 1,2,3,4,6,7,8,9,12,13,14,16,18,19,21,24,25,26,27,28,31,32,36,37,38,
%T A225837 39,42,43,48,49,50,52,54,55,56,57,61,62,63,64,67,72,73,74,75,76,78,79,
%U A225837 81,84,85,86,91,93,96,97,98,100,103,104,108,109,110,111,112
%N A225837 Numbers of form 2^i*3^j*(6k+1), i, j, k >= 0.
%C A225837 The asymptotic density of this sequence is 1/2. - _Amiram Eldar_, Apr 03 2022
%C A225837 From _Peter Munn_, Nov 16 2023: (Start)
%C A225837 Contains all nonzero squares.
%C A225837 Dividing by 5 the terms that are multiples of 5 gives its complement, A225838.
%C A225837 (A352272, 2*A352272, 3*A352272, 6*A352272) is a partition of the terms.
%C A225837 The terms form a subgroup of the positive integers under the operation A059897(.,.) and are the positive integers in an index 2 multiplicative subgroup of rationals that is generated by 2, 3 and integers congruent to 1 modulo 6. See A225857 and A352272 for further information about such subgroups.
%C A225837 (End)
%H A225837 Amiram Eldar, <a href="/A225837/b225837.txt">Table of n, a(n) for n = 1..10000</a>
%t A225837 mx = 122; t = {}; Do[n = 2^i*3^j (6 k + 1); If[n <= mx, AppendTo[t, n]], {i, 0, Log[2, mx]}, {j, 0, Log[3, mx]}, {k, 0, mx/6}]; Union[t] (* _T. D. Noe_, May 16 2013 *)
%o A225837 (PARI) for(n=1,200,t=n/(2^valuation(n,2)*3^valuation(n,3));if((t%6==1),print1(n,",")))
%o A225837 (Magma) [n: n in [1..200] | IsOne(d mod 6) where d is n div (2^Valuation(n,2)*3^Valuation(n,3))]; // _Bruno Berselli_, May 16 2013
%o A225837 (Python)
%o A225837 from sympy import integer_log
%o A225837 def A225837(n):
%o A225837     def bisection(f,kmin=0,kmax=1):
%o A225837         while f(kmax) > kmax: kmax <<= 1
%o A225837         kmin = kmax >> 1
%o A225837         while kmax-kmin > 1:
%o A225837             kmid = kmax+kmin>>1
%o A225837             if f(kmid) <= kmid:
%o A225837                 kmax = kmid
%o A225837             else:
%o A225837                 kmin = kmid
%o A225837         return kmax
%o A225837     def f(x): return n+x-sum(((x//3**i>>j)+5)//6 for i in range(integer_log(x,3)[0]+1) for j in range((x//3**i).bit_length()))
%o A225837     return bisection(f,n,n) # _Chai Wah Wu_, Feb 02 2025
%Y A225837 Complement of A225838.
%Y A225837 Subsequences: A003136\{0}, A083854\{0}, A260488\{0}, A352272.
%Y A225837 Symmetric difference of A026225 and A036554; of A036668 and A189716.
%Y A225837 Cf. A016921, A059897, A225857.
%K A225837 nonn,easy
%O A225837 1,2
%A A225837 _Ralf Stephan_, May 16 2013