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.

Showing 1-10 of 10 results.

A379003 Ordinal transform of A132741, where A132741 is the largest divisor of n having the form 2^i*5^j. a(0) = 0 by convention.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 2, 3, 1, 4, 1, 5, 2, 6, 3, 2, 1, 7, 4, 8, 1, 9, 5, 10, 2, 1, 6, 11, 3, 12, 2, 13, 1, 14, 7, 3, 4, 15, 8, 16, 1, 17, 9, 18, 5, 4, 10, 19, 2, 20, 1, 21, 6, 22, 11, 5, 3, 23, 12, 24, 2, 25, 13, 26, 1, 6, 14, 27, 7, 28, 3, 29, 4, 30, 15, 2, 8, 31, 16, 32, 1, 33, 17, 34, 9, 7, 18, 35, 5, 36, 4, 37, 10
Offset: 0

Views

Author

Antti Karttunen, Dec 15 2024

Keywords

Comments

Ordinal transform of the ordered pair [A007814(n), A112765(n)].
This sequence and A379004 are ordinal transforms of each other (if the initial 0 is discarded).

Crossrefs

Cf. A007814, A112765, A132741, A379004 (ordinal transform of this sequence after the initial 0).
Cf. also A126760, A379006.

Programs

  • PARI
    up_to = 20000;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    v379003 = ordinal_transform(vector(up_to, n, [valuation(n,2), valuation(n,5)]));
    A379003(n) = if(!n,n,v379003[n]);

A003592 Numbers of the form 2^i*5^j with i, j >= 0.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 16, 20, 25, 32, 40, 50, 64, 80, 100, 125, 128, 160, 200, 250, 256, 320, 400, 500, 512, 625, 640, 800, 1000, 1024, 1250, 1280, 1600, 2000, 2048, 2500, 2560, 3125, 3200, 4000, 4096, 5000, 5120, 6250, 6400, 8000, 8192, 10000, 10240, 12500, 12800
Offset: 1

Views

Author

Keywords

Comments

These are the natural numbers whose reciprocals are terminating decimals. - David Wasserman, Feb 26 2002
A132726(a(n), k) = 0 for k <= a(n); A051626(a(n)) = 0; A132740(a(n)) = 1; A132741(a(n)) = a(n). - Reinhard Zumkeller, Aug 27 2007
Where record values greater than 1 occur in A165706: A165707(n) = A165706(a(n)). - Reinhard Zumkeller, Sep 26 2009
Also numbers that are divisible by neither 10k - 7, 10k - 3, 10k - 1 nor 10k + 1, for all k > 0. - Robert G. Wilson v, Oct 26 2010
A204455(5*a(n)) = 5, and only for these numbers. - Wolfdieter Lang, Feb 04 2012
Since p = 2 and q = 5 are coprime, sum_{n >= 1} 1/a(n) = sum_{i >= 0} sum_{j >= 0} 1/p^i * 1/q^j = sum_{i >= 0} 1/p^i q/(q - 1) = p*q/((p-1)*(q-1)) = 2*5/(1*4) = 2.5. - Franklin T. Adams-Watters, Jul 07 2014
Conjecture: Each positive integer n not among 1, 4 and 12 can be written as a sum of finitely many numbers of the form 2^a*5^b + 1 (a,b >= 0) with no one dividing another. This has been verified for n <= 3700. - Zhi-Wei Sun, Apr 18 2023
1,2 and 4,5 are the only consecutive terms in the sequence. - Robin Jones, May 03 2025

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 73.

Crossrefs

Complement of A085837. Cf. A094958, A022333 (list of j), A022332 (list of i).
Cf. A164768 (difference between consecutive terms)

Programs

  • GAP
    Filtered([1..10000],n->PowerMod(10,n,n)=0); # Muniru A Asiru, Mar 19 2019
  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a003592 n = a003592_list !! (n-1)
    a003592_list = f $ singleton 1 where
       f s = y : f (insert (2 * y) $ insert (5 * y) s')
                   where (y, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 16 2015
    
  • Magma
    [n: n in [1..10000] | PrimeDivisors(n) subset [2,5]]; // Bruno Berselli, Sep 24 2012
    
  • Maple
    isA003592 := proc(n)
          if n = 1 then
            true;
        else
            return (numtheory[factorset](n) minus {2,5} = {} );
        end if;
    end proc:
    A003592 := proc(n)
         option remember;
         if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA003592(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jul 16 2012
  • Mathematica
    twoFiveableQ[n_] := PowerMod[10, n, n] == 0; Select[Range@ 10000, twoFiveableQ] (* Robert G. Wilson v, Jan 12 2012 *)
    twoFiveableQ[n_] := Union[ MemberQ[{1, 3, 7, 9}, # ] & /@ Union@ Mod[ Rest@ Divisors@ n, 10]] == {False}; twoFiveableQ[1] = True; Select[Range@ 10000, twoFiveableQ] (* Robert G. Wilson v, Oct 26 2010 *)
    maxExpo = 14; Sort@ Flatten@ Table[2^i * 5^j, {i, 0, maxExpo}, {j, 0, Log[5, 2^(maxExpo - i)]}] (* Or *)
    Union@ Flatten@ NestList[{2#, 4#, 5#} &, 1, 7] (* Robert G. Wilson v, Apr 16 2011 *)
  • PARI
    list(lim)=my(v=List(),N);for(n=0,log(lim+.5)\log(5),N=5^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
    
  • Python
    # A003592.py
    from heapq import heappush, heappop
    def A003592():
        pq = [1]
        seen = set(pq)
        while True:
            value = heappop(pq)
            yield value
            seen.remove(value)
            for x in 2*value, 5*value:
                if x not in seen:
                    heappush(pq, x)
                    seen.add(x)
    sequence = A003592()
    A003592_list = [next(sequence) for _ in range(100)]
    
  • Python
    from sympy import integer_log
    def A003592(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum((x//5**i).bit_length() for i in range(integer_log(x,5)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Feb 24 2025
    
  • Sage
    def isA003592(n) :
        return not any(d != 2 and d != 5 for d in prime_divisors(n))
    @CachedFunction
    def A003592(n) :
        if n == 1 : return 1
        k = A003592(n-1) + 1
        while not isA003592(k) : k += 1
        return k
    [A003592(n) for n in (1..48)]  # Peter Luschny, Jul 20 2012
    

Formula

The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(10*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
a(n) ~ exp(sqrt(2*log(2)*log(5)*n)) / sqrt(10). - Vaclav Kotesovec, Sep 22 2020
a(n) = 2^A022332(n) * 5^A022333(n). - R. J. Mathar, Jul 06 2025

Extensions

Incomplete Python program removed by David Radcliffe, Jun 27 2016

A007732 Period of decimal representation of 1/n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 2, 1, 6, 6, 1, 1, 16, 1, 18, 1, 6, 2, 22, 1, 1, 6, 3, 6, 28, 1, 15, 1, 2, 16, 6, 1, 3, 18, 6, 1, 5, 6, 21, 2, 1, 22, 46, 1, 42, 1, 16, 6, 13, 3, 2, 6, 18, 28, 58, 1, 60, 15, 6, 1, 6, 2, 33, 16, 22, 6, 35, 1, 8, 3, 1, 18, 6, 6, 13, 1, 9, 5, 41, 6, 16, 21, 28, 2, 44, 1
Offset: 1

Views

Author

N. J. A. Sloane, Hal Sampson [ hals(AT)easynet.com ]

Keywords

Comments

Appears to be a divisor of A007733*A007736. - Henry Bottomley, Dec 20 2001
Primes p such that a(p) = p-1 are in A001913. - Dmitry Kamenetsky, Nov 13 2008
When 1/n has a finite decimal expansion (namely, when n = 2^a*5^b), a(n) = 1 while A051626(n) = 0. - M. F. Hasler, Dec 14 2015
a(n.n) >= a(n) where n.n is A020338(n). - Davide Rotondo, Jun 13 2024

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, pp. 159 etc.

Crossrefs

Programs

  • Maple
    A007732 := proc(n)
        a132740 := 1 ;
        for pe in ifactors(n)[2] do
            if not op(1,pe) in {2,5} then
                a132740 := a132740*op(1,pe)^op(2,pe) ;
            end if;
        end do:
        if a132740 = 1 then
            1 ;
        else
            numtheory[order](10,a132740) ;
        end if;
    end proc:
    seq(A007732(n),n=1..50) ; # R. J. Mathar, May 05 2023
  • Mathematica
    Table[r = n/2^IntegerExponent[n, 2]/5^IntegerExponent[n, 5]; MultiplicativeOrder[10, r], {n, 100}] (* T. D. Noe, Oct 17 2012 *)
  • PARI
    a(n)=znorder(Mod(10,n/2^valuation(n,2)/5^valuation(n,5))) \\ Charles R Greathouse IV, Jan 14 2013
    
  • Python
    from sympy import n_order, multiplicity
    def A007732(n): return n_order(10,n//2**multiplicity(2,n)//5**multiplicity(5,n)) # Chai Wah Wu, Feb 07 2022
  • Sage
    def a(n):
        n = ZZ(n)
        rad = 2**n.valuation(2) * 5**n.valuation(5)
        return Zmod(n // rad)(10).multiplicative_order()
    [a(n) for n in range(1, 20)]
    # F. Chapoton, May 03 2020
    

Formula

Note that if n=r*s where r is a power of 2 and s is odd then a(n)=a(s). Also if n=r*s where r is a power of 5 and s is not divisible by 5 then a(n) = a(s). So we just need a(n) for n not divisible by 2 or 5. This is the smallest number m such that n divides 10^m - 1; m is a divisor of phi(n), where phi = A000010.
phi(n) = n-1 only if n is prime and since a(n) divides phi(n), a(n) can only equal n-1 if n is prime. - Scott Hemphill (hemphill(AT)alumni.caltech.edu), Nov 23 2006
a(n)=a(A132740(n)); a(A132741(n))=a(A003592(n))=1. - Reinhard Zumkeller, Aug 27 2007

Extensions

More terms from James Sellers, Feb 05 2000

A051626 Period of decimal representation of 1/n, or 0 if 1/n terminates.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 6, 0, 1, 0, 2, 1, 6, 6, 1, 0, 16, 1, 18, 0, 6, 2, 22, 1, 0, 6, 3, 6, 28, 1, 15, 0, 2, 16, 6, 1, 3, 18, 6, 0, 5, 6, 21, 2, 1, 22, 46, 1, 42, 0, 16, 6, 13, 3, 2, 6, 18, 28, 58, 1, 60, 15, 6, 0, 6, 2, 33, 16, 22, 6, 35, 1, 8, 3, 1, 18, 6, 6, 13, 0, 9, 5, 41, 6, 16, 21, 28, 2, 44, 1
Offset: 1

Views

Author

Keywords

Comments

Essentially same as A007732.
For any prime number p: if a(p) > 0, a(p) divides p-1. - David Spitzer, Jan 09 2017

Examples

			From _M. F. Hasler_, Dec 14 2015: (Start)
a(1) = a(2) = 0 because 1/1 = 1 and 1/2 = 0.5 have a finite decimal expansion.
a(3) = a(6) = a(9) = a(12) = 1 because 1/3 = 0.{3}*, 1/6 = 0.1{6}*, 1/9 = 0.{1}*, 1/12 = 0.08{3}* where the sequence of digits {...}* which repeats indefinitely is of length 1.
a(7) = 6 because 1/7 = 0.{142857}* with a period of 6.
a(17) = 16 because 1/17 = 0.{0588235294117647}* with a period of 16.
a(19) = 18 because 1/19 = 0.{052631578947368421}* with a period of 18. (End)
		

Crossrefs

Essentially same as A007732. Cf. A002371, A048595, A006883, A036275, A114205, A114206, A001913.

Programs

  • Maple
    A051626 := proc(n) local lpow,mpow ;
        if isA003592(n) then
           RETURN(0) ;
        else
           lpow:=1 ;
           while true do
              for mpow from lpow-1 to 0 by -1 do
                  if (10^lpow-10^mpow) mod n =0 then
                     RETURN(lpow-mpow) ;
                  fi ;
              od ;
              lpow := lpow+1 ;
           od ;
        fi ;
    end: # R. J. Mathar, Oct 19 2006
  • Mathematica
    r[x_]:=RealDigits[1/x]; w[x_]:=First[r[x]]; f[x_]:=First[w[x]]; l[x_]:=Last[w[x]]; z[x_]:=Last[r[x]];
    d[x_] := Which[IntegerQ[l[x]], 0, IntegerQ[f[x]]==False, Length[f[x]], True, Length[l[x]]]; Table[d[i], {i,1,90}] (* Hans Havermann, Oct 19 2006 *)
    fd[n_] := Block[{q},q = Last[First[RealDigits[1/n]]];If[IntegerQ[q], q = {}]; Length[q]];Table[fd[n], {n, 100}] (* Ray Chandler, Dec 06 2006 *)
    Table[Length[RealDigits[1/n][[1,-1]]],{n,90}] (* Harvey P. Dale, Jul 03 2011 *)
    a[n_] := If[ PowerMod[10, n, n] == 0, 0, MultiplicativeOrder[10, n/2^IntegerExponent[n, 2]/5^IntegerExponent[n, 5]]]; Array[a, 90] (* myself in A003592 and T. D. Noe in A007732 *) (* Robert G. Wilson v, Feb 20 2025 *)
  • PARI
    A051626(n)=if(1M. F. Hasler, Dec 14 2015
    
  • Python
    def A051626(n):
        if isA003592(n):
            return 0
        else:
            lpow=1
            while True:
                for mpow in range(lpow-1,-1,-1):
                    if (10**lpow-10**mpow) % n == 0:
                        return lpow-mpow
                lpow += 1 # Kenneth Myers, May 06 2016
    
  • Python
    from sympy import multiplicity, n_order
    def A051626(n): return 0 if (m:=(n>>(~n & n-1).bit_length())//5**multiplicity(5,n)) == 1 else n_order(10,m) # Chai Wah Wu, Aug 11 2022

Formula

a(n)=A132726(n,1); a(n)=a(A132740(n)); a(A132741(n))=a(A003592(n))=0. - Reinhard Zumkeller, Aug 27 2007

Extensions

More terms from James Sellers

A132740 Largest divisor of n coprime to 10.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 7, 1, 9, 1, 11, 3, 13, 7, 3, 1, 17, 9, 19, 1, 21, 11, 23, 3, 1, 13, 27, 7, 29, 3, 31, 1, 33, 17, 7, 9, 37, 19, 39, 1, 41, 21, 43, 11, 9, 23, 47, 3, 49, 1, 51, 13, 53, 27, 11, 7, 57, 29, 59, 3, 61, 31, 63, 1, 13, 33, 67, 17, 69, 7, 71, 9, 73, 37, 3, 19, 77, 39, 79, 1, 81
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 27 2007

Keywords

Comments

Or: n with all factors of 2 and 5 removed. - M. F. Hasler, Apr 25 2017

Examples

			a(1050) = a(2*3*5*5*7) = 3*7 = 21.
		

Crossrefs

Programs

Formula

a(n) = A000265(A132739(n)) = A132739(A000265(n)) = n / A132741(n);
A051626(a(n)) = A051626(n); A007732(a(n)) = A007732(n);
a(A003592(n)) = 1.
Multiplicative with a(2^e) = 1, a(5^e) = 1 and a(p^e) = p^e for p = 3 and p >= 7.
Dirichlet g.f. zeta(s-1)*(2^s-2)*(5^s-5)/((2^s-1)*(5^s-1)). - R. J. Mathar, Sep 06 2011
Sum_{k=1..n} a(k) ~ (5/18) * n^2. - Amiram Eldar, Nov 28 2022

Extensions

Edited by M. F. Hasler, Apr 25 2017

A355582 a(n) is the largest 5-smooth divisor of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 1, 8, 9, 10, 1, 12, 1, 2, 15, 16, 1, 18, 1, 20, 3, 2, 1, 24, 25, 2, 27, 4, 1, 30, 1, 32, 3, 2, 5, 36, 1, 2, 3, 40, 1, 6, 1, 4, 45, 2, 1, 48, 1, 50, 3, 4, 1, 54, 5, 8, 3, 2, 1, 60, 1, 2, 9, 64, 5, 6, 1, 4, 3, 10, 1, 72, 1, 2, 75, 4, 1, 6, 1, 80
Offset: 1

Views

Author

Amiram Eldar, Jul 08 2022

Keywords

Crossrefs

Cf. A379005 (rgs-transform), A379006 (ordinal transform).

Programs

  • Mathematica
    a[n_] := Times @@ ({2, 3, 5}^IntegerExponent[n, {2, 3, 5}]); Array[a, 100]
  • PARI
    a(n) = 3^valuation(n, 3) * 5^valuation(n, 5) << valuation(n, 2);
    
  • Python
    from sympy import multiplicity as v
    def a(n): return 2**v(2, n) * 3**v(3, n) * 5**v(5, n)
    print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Jul 08 2022

Formula

Multiplicative with a(p^e) = p^e if p <= 5 and 1 otherwise.
a(n) = A006519(n) * A038500(n) * A060904(n).
a(n) = 2^A007814(n) * 3^A007949(n) * 5^A112765(n).
a(n) = n / A165725(n).
Dirichlet g.f.: zeta(s)*(2^s-1)*(3^s-1)*(5^s-1)/((2^s-2)*(3^s-3)*(5^s-5)). - Amiram Eldar, Dec 25 2022
Sum_{k=1..n} a(k) ~ 2*n*log(n)^3 / (45*log(2)*log(3)*log(5)) + O(n*log(n)^2). - Vaclav Kotesovec, Apr 20 2025

A051628 Number of digits in decimal expansion of 1/n before the periodic part begins.

Original entry on oeis.org

0, 1, 0, 2, 1, 1, 0, 3, 0, 1, 0, 2, 0, 1, 1, 4, 0, 1, 0, 2, 0, 1, 0, 3, 2, 1, 0, 2, 0, 1, 0, 5, 0, 1, 1, 2, 0, 1, 0, 3, 0, 1, 0, 2, 1, 1, 0, 4, 0, 2, 0, 2, 0, 1, 1, 3, 0, 1, 0, 2, 0, 1, 0, 6, 1, 1, 0, 2, 0, 1, 0, 3, 0, 1, 2, 2, 0, 1, 0, 4, 0, 1, 0, 2, 1, 1, 0, 3, 0, 1, 0, 2, 0, 1, 1, 5, 0, 1, 0, 2, 0, 1, 0, 3, 1
Offset: 1

Views

Author

Keywords

Examples

			1/8 = .1250000... so a(8)=3, 1/15 = .0666666..., so a(15)=1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Max[IntegerExponent[n, 2], IntegerExponent[n, 5]];
    Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Jul 20 2022, after Chai Wah Wu *)
  • PARI
    a(n) = max(valuation(n, 2), valuation(n, 5)); \\ Michel Marcus, Oct 27 2022
  • Python
    from sympy import multiplicity
    def A051628(n): return max(multiplicity(2,n),multiplicity(5,n)) # Chai Wah Wu, Feb 07 2022
    

Formula

For n>1, a(n) = max(i, j) where n=2^i*3^x*5^j*... is the prime decomposition of n.
From Amiram Eldar, Aug 25 2024: (Start)
a(n) = max(A007814(n), A112765(n)).
a(n) = A051903(A132741(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 41/36. (End)

Extensions

More terms from Michael Lugo (mlugo(AT)thelabelguy.com), Dec 22 1999
More terms from Franklin T. Adams-Watters, May 05 2006

A379004 Lexicographically earliest infinite sequence such that a(i) = a(j) => v_2(i) = v_2(j) and v_5(i) = v_5(j), for all i, j, where v_2 (A007814) and v_5 (A112765) give the 2- and 5-adic valuations of n respectively.

Original entry on oeis.org

1, 2, 1, 3, 4, 2, 1, 5, 1, 6, 1, 3, 1, 2, 4, 7, 1, 2, 1, 8, 1, 2, 1, 5, 9, 2, 1, 3, 1, 6, 1, 10, 1, 2, 4, 3, 1, 2, 1, 11, 1, 2, 1, 3, 4, 2, 1, 7, 1, 12, 1, 3, 1, 2, 4, 5, 1, 2, 1, 8, 1, 2, 1, 13, 4, 2, 1, 3, 1, 6, 1, 5, 1, 2, 9, 3, 1, 2, 1, 14, 1, 2, 1, 3, 4, 2, 1, 5, 1, 6, 1, 3, 1, 2, 4, 10, 1, 2, 1, 15, 1, 2, 1, 5, 4
Offset: 1

Views

Author

Antti Karttunen, Dec 15 2024

Keywords

Comments

Restricted growth sequence transform of A132741, or equally, of the ordered pair [A007814(n), A112765(n)].
For all i, j:
A379005(i) = A379005(j) => a(i) = a(j).
A379003 (after its initial 0) and this sequence are ordinal transforms of each other.

Crossrefs

Cf. A007814, A112765, A132741, A379003 (ordinal transform), A379005.

Programs

  • PARI
    up_to = 100000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    v379004 = rgs_transform(vector(up_to, n, [valuation(n,2), valuation(n,5)]));
    A379004(n) = v379004[n];

A227071 Let s(m) = the set of k > 0 such that k^m ends with k. Then a(n) = least m such that s(m) = s(n).

Original entry on oeis.org

1, 2, 3, 2, 5, 6, 3, 2, 9, 2, 11, 2, 5, 2, 3, 6, 17, 2, 3, 2, 21, 2, 3, 2, 9, 26, 3, 2, 5, 2, 11, 2, 33, 2, 3, 6, 5, 2, 3, 2, 41, 2, 3, 2, 5, 6, 3, 2, 17, 2, 51, 2, 5, 2, 3, 6, 9, 2, 3, 2, 21, 2, 3, 2, 65, 6, 3, 2, 5, 2, 11, 2, 9, 2, 3, 26, 5, 2, 3, 2, 81, 2
Offset: 1

Views

Author

T. D. Noe, Jul 29 2013

Keywords

Comments

See A227070 for more details and for the numbers n such that n = a(n).
The entries in the b-file have been tentatively obtained by comparing the terms < 10^30 in the sets s(n). - Giovanni Resta, Jul 30 2013

Crossrefs

Cf. A003226 (n=2), A033819 (n=3), A068407 (n=5), A068408 (n=6).
Cf. A072496 (n=11), A072495 (n=21), A076650 (n=26).
Cf. A227070 (n such that n = a(n)).

Programs

  • Mathematica
    ts = {{}}; t2 = {1}; te = {1}; Do[s = Select[Range[0, 10^7], PowerMod[#, n, 10^IntegerLength[#]] == # &]; If[MemberQ[ts, s], AppendTo[t2, te[[Position[ts, s, 1, 1][[1, 1]]]]], AppendTo[ts, s]; AppendTo[te, n]; AppendTo[t2, n]], {n, 2, 82}]; t2

Formula

Conjecture: a(n+1) = A132741(n) + 1. - Eric M. Schmidt, Jul 30 2013

Extensions

Mathematica program and some entries corrected by Giovanni Resta, Jul 30 2013

A305720 Square array T(n, k) read by antidiagonals, n > 0 and k > 0; for any prime number p, the p-adic valuation of T(n, k) is the product of the p-adic valuations of n and of k.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 16, 1, 2, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 8, 1, 4, 5, 4, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 9, 64, 1, 6, 1, 64, 9, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 4, 1, 8, 7, 8
Offset: 1

Views

Author

Rémy Sigrist, Jun 09 2018

Keywords

Comments

The array T is completely multiplicative in both parameters.
For any n > 0 and prime number p, T(n, p) is the highest power of p dividing n.
For any function f associating a nonnegative value to any pair of nonnegative values and such that f(0, 0) = 0, we can build an analog of this sequence, say P_f, such that for any prime number p and any n and k > 0 with p-adic valuations i and j, the p-adic valuation of P_f(n, k) equals f(i, j):
f(i, j) P_f
------- ---
i * j T (this sequence)
i + j A003991 (product)
abs(i-j) A089913
min(i, j) A003989 (GCD)
max(i, j) A003990 (LCM)
i AND j A059895
i OR j A059896
i XOR j A059897
If log(N) denotes the set {log(n) : n is in N, the set of the positive integers}, one can define a binary operation on log(N): with prime factorizations n = Product p_i^e_i and k = Product p_i^f_i, set log(n) o log(k) = Sum_{i} (e_i*f_i) * log(p_i). o has the premises of a scalar product even if log(N) isn't a vector space. T(n, k) can be viewed as exp(log(n) o log(k)). - Luc Rousseau, Oct 11 2020

Examples

			Array T(n, k) begins:
  n\k|    1    2    3    4    5    6    7    8    9   10
  ---+--------------------------------------------------
    1|    1    1    1    1    1    1    1    1    1    1
    2|    1    2    1    4    1    2    1    8    1    2  -> A006519
    3|    1    1    3    1    1    3    1    1    9    1  -> A038500
    4|    1    4    1   16    1    4    1   64    1    4
    5|    1    1    1    1    5    1    1    1    1    5  -> A060904
    6|    1    2    3    4    1    6    1    8    9    2  -> A065331
    7|    1    1    1    1    1    1    7    1    1    1  -> A268354
    8|    1    8    1   64    1    8    1  512    1    8
    9|    1    1    9    1    1    9    1    1   81    1
   10|    1    2    1    4    5    2    1    8    1   10  -> A132741
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := With[{p = FactorInteger[GCD[n, k]][[All, 1]]}, If[p == {1}, 1, Times @@ (p^(IntegerExponent[n, p] * IntegerExponent[k, p]))]];
    Table[T[n-k+1, k], {n, 1, 15}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 11 2018 *)
  • PARI
    T(n, k) = my (p=factor(gcd(n, k))[,1]); prod(i=1, #p, p[i]^(valuation(n, p[i]) * valuation(k, p[i])))

Formula

T(n, k) = T(k, n) (T is commutative).
T(m, T(n, k)) = T(T(m, n), k) (T is associative).
T(n, k) = 1 iff gcd(n, k) = 1.
T(n, n) = A054496(n).
T(n, A007947(n)) = n.
T(n, 1) = 1.
T(n, 2) = A006519(n).
T(n, 3) = A038500(n).
T(n, 4) = A006519(n)^2.
T(n, 5) = A060904(n).
T(n, 6) = A065331(n).
T(n, 7) = A268354(n).
T(n, 8) = A006519(n)^3.
T(n, 9) = A038500(n)^2.
T(n, 10) = A132741(n).
T(n, 11) = A268357(n).
Showing 1-10 of 10 results.