login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A003594 Numbers of the form 3^i*7^j with i, j >= 0. 16
1, 3, 7, 9, 21, 27, 49, 63, 81, 147, 189, 243, 343, 441, 567, 729, 1029, 1323, 1701, 2187, 2401, 3087, 3969, 5103, 6561, 7203, 9261, 11907, 15309, 16807, 19683, 21609, 27783, 35721, 45927, 50421, 59049, 64827, 83349, 107163, 117649 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Vincenzo Librandi and Reinhard Zumkeller, Table of n, a(n) for n = 1..10000, first 70 terms from Vincenzo Librandi

FORMULA

The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(21*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

MATHEMATICA

f[upto_]:=Sort[Select[Flatten[3^First[#] 7^Last[#] & /@ Tuples[{Range[0, Floor[Log[3, upto]]], Range[0, Floor[Log[7, upto]]]}]], # <= upto &]]; f[120000]  (* Harvey P. Dale, Mar 04 2011 *)

fQ[n_] := PowerMod[21, n, n] == 0; Select[Range[120000], fQ] (* Bruno Berselli, Sep 24 2012 *)

PROG

(PARI) list(lim)=my(v=List(), N); for(n=0, log(lim)\log(7), N=7^n; while(N<=lim, listput(v, N); N*=3)); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011

(MAGMA) [n: n in [1..120000] | PrimeDivisors(n) subset [3, 7]]; // Bruno Berselli, Sep 24 2012

(Haskell)

import Data.Set (singleton, deleteFindMin, insert)

a003594 n = a003594_list !! (n-1)

a003594_list = f $ singleton 1 where

   f s = y : f (insert (3 * y) $ insert (7 * y) s')

               where (y, s') = deleteFindMin s

-- Reinhard Zumkeller, May 16 2015

(GAP) Filtered([1..120000], n->PowerMod(21, n, n)=0); # Muniru A Asiru, Mar 19 2019

CROSSREFS

Cf. A003586, A003591, A003592, A003593, A003595.

Sequence in context: A056745 A057263 A057493 * A014854 A108729 A133027

Adjacent sequences:  A003591 A003592 A003593 * A003595 A003596 A003597

KEYWORD

nonn

AUTHOR

N. J. A. Sloane.

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 18 03:39 EST 2020. Contains 332006 sequences. (Running on oeis4.)