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.

A003591 Numbers of form 2^i*7^j, with i, j >= 0.

This page as a plain text file.
%I A003591 #61 Jul 06 2025 10:33:39
%S A003591 1,2,4,7,8,14,16,28,32,49,56,64,98,112,128,196,224,256,343,392,448,
%T A003591 512,686,784,896,1024,1372,1568,1792,2048,2401,2744,3136,3584,4096,
%U A003591 4802,5488,6272,7168,8192,9604,10976,12544,14336,16384,16807,19208,21952,25088
%N A003591 Numbers of form 2^i*7^j, with i, j >= 0.
%C A003591 A204455(7*a(n)) = 7, and only for these numbers. - _Wolfdieter Lang_, Feb 04 2012
%H A003591 Reinhard Zumkeller, <a href="/A003591/b003591.txt">Table of n, a(n) for n = 1..10000</a> (first 100 terms from Vincenzo Librandi)
%H A003591 Vaclav Kotesovec, <a href="/A003591/a003591.jpg">Graph - the asymptotic ratio (250000 terms)</a>
%F A003591 The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(14*n)*x^n/(1 - x^n), where mu(n) is the Möbius function A008683. Cf. with the formula of Hanna in A051037. - _Peter Bala_, Mar 18 2019
%F A003591 Sum_{n>=1} 1/a(n) = (2*7)/((2-1)*(7-1)) = 7/3. - _Amiram Eldar_, Sep 22 2020
%F A003591 a(n) ~ exp(sqrt(2*log(2)*log(7)*n)) / sqrt(14). - _Vaclav Kotesovec_, Sep 22 2020
%F A003591 a(n) = 2^A025637(n) *7^A025664(n). - _R. J. Mathar_, Jul 06 2025
%t A003591 fQ[n_] := PowerMod[14,n,n]==0; Select[Range[30000], fQ] (* _Vincenzo Librandi_, Feb 04 2012 *)
%o A003591 (PARI) list(lim)=my(v=List(),N);for(n=0,log(lim)\log(7),N=7^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ _Charles R Greathouse IV_, Jun 28 2011
%o A003591 (PARI) isA003591(n)=n>>=valuation(n,2);ispower(n,,&n);n==1||n==7 \\ _Charles R Greathouse IV_, Jun 28 2011
%o A003591 (Magma) [n: n in [1..26000] | PrimeDivisors(n) subset [2,7]]; // _Bruno Berselli_, Sep 24 2012
%o A003591 (Haskell)
%o A003591 import Data.Set (singleton, deleteFindMin, insert)
%o A003591 a003591 n = a003591_list !! (n-1)
%o A003591 a003591_list = f $ singleton 1 where
%o A003591    f s = y : f (insert (2 * y) $ insert (7 * y) s')
%o A003591                where (y, s') = deleteFindMin s
%o A003591 -- _Reinhard Zumkeller_, May 16 2015
%o A003591 (GAP) Filtered([1..30000],n->PowerMod(14,n,n)=0); # _Muniru A Asiru_, Mar 19 2019
%o A003591 (Python)
%o A003591 from sympy import integer_log
%o A003591 def A003591(n):
%o A003591     def bisection(f,kmin=0,kmax=1):
%o A003591         while f(kmax) > kmax: kmax <<= 1
%o A003591         while kmax-kmin > 1:
%o A003591             kmid = kmax+kmin>>1
%o A003591             if f(kmid) <= kmid:
%o A003591                 kmax = kmid
%o A003591             else:
%o A003591                 kmin = kmid
%o A003591         return kmax
%o A003591     def f(x): return n+x-sum((x//7**i).bit_length() for i in range(integer_log(x,7)[0]+1))
%o A003591     return bisection(f,n,n) # _Chai Wah Wu_, Sep 16 2024
%Y A003591 Cf. A003586, A003592, A003593, A003594, A003595.
%Y A003591 Cf. A025637, A025664.
%K A003591 nonn
%O A003591 1,2
%A A003591 _N. J. A. Sloane_