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-3 of 3 results.

A344590 Number of divisors d of n for which A011772(d) = A011772(n), where A011772(n) is the smallest number m such that m(m+1)/2 is divisible by n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 3, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 2, 2, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 3, 1, 1, 1, 1, 2
Offset: 1

Views

Author

Antti Karttunen, May 31 2021

Keywords

Examples

			36 has 9 divisors: 1, 2, 3, 4, 6, 9, 12, 18, 36. When A011772 is applied to them, one obtains values [1, 3, 2, 7, 3, 8, 8, 8, 8], thus there are four divisors that obtain the maximal value 8 obtained at 36 itself, therefore a(36) = 4.
		

Crossrefs

Cf. A000005, A011772, A344588 (positions of records), A344589, A344758, A344770, A344881 (positions of ones), A344882 (of terms > 1).

Programs

  • Mathematica
    A011772[n_] := Module[{m = 1}, While[Not[IntegerQ[m(m+1)/(2n)]], m++]; m];
    a[n_] := With[{m = A011772[n]}, Count[Divisors[n], d_ /; A011772[d] == m]];
    Array[a, 100] (* Jean-François Alcover, Jun 12 2021 *)
  • PARI
    A011772(n) = { if(n==1, return(1)); my(f=factor(if(n%2, n, 2*n)), step=vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); forstep(m=step, 2*n, step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))); }; \\ From A011772
    A344590(n) = { my(x=A011772(n)); sumdiv(n,d,A011772(d)==x); };
    
  • Python
    from itertools import combinations
    from functools import reduce
    from operator import mul
    from sympy import factorint, divisors
    from sympy.ntheory.modular import crt
    def A011772(n):
        plist = [p**q for p, q in factorint(2*n).items()]
        if len(plist) == 1:
            return n-1 if plist[0] % 2 else 2*n-1
        return min(min(crt([m,2*n//m],[0,-1])[0],crt([2*n//m,m],[0,-1])[0]) for m in (reduce(mul, d) for l in range(1,len(plist)//2+1) for d in combinations(plist,l)))
    def A344590(n):
        m = A011772(n)
        return sum(1 for d in divisors(n) if A011772(d) == m) # Chai Wah Wu, Jun 02 2021

Formula

a(n) = Sum_{d|n} [A011772(d) = A011772(n)], where [ ] is the Iverson bracket.
a(n) = A000005(n) - A344589(n).
a(n) <= A344770(n).

A345934 Ordinal transform of Kempner numbers, A002034.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 3, 2, 1, 3, 1, 4, 3, 2, 1, 4, 1, 2, 1, 4, 1, 5, 1, 1, 3, 2, 5, 4, 1, 2, 3, 6, 1, 6, 1, 4, 5, 2, 1, 6, 1, 2, 3, 4, 1, 2, 5, 7, 3, 2, 1, 7, 1, 2, 8, 2, 5, 6, 1, 4, 3, 9, 1, 7, 1, 2, 3, 4, 7, 6, 1, 8, 3, 2, 1, 10, 5, 2, 3, 8, 1, 9, 7, 4, 3, 2, 5, 3, 1, 2, 9, 4, 1, 6, 1, 8, 11
Offset: 1

Views

Author

Antti Karttunen, Jul 02 2021

Keywords

Comments

Number of values of k, 1 <= k <= n, with A002034(k) = A002034(n).

Crossrefs

Cf. also A344770.

Programs

  • Mathematica
    Table[Length@Select[Table[m=1;While[Mod[m!,k]!=0,m++];m,{k,n}],#==(m=1;While[Mod[m!,n]!=0,m++];m)&],{n,100}] (* Giorgos Kalogeropoulos, Jul 03 2021 *)
  • PARI
    up_to = 65537;
    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; };
    A002034(n) = if(1==n,n,my(s=factor(n)[, 1], k=s[#s], f=Mod(k!, n)); while(f, f*=k++); (k)); \\ After code in A002034.
    v345934 = ordinal_transform(vector(up_to,n,A002034(n)));
    A345934(n) = v345934[n];

Formula

a(n) >= A345935(n).

A354990 Ordinal transform of A344005, where A344005(n) is the smallest positive integer m such that n divides m*(m+1).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 17 2022

Keywords

Comments

Number of values of k, 1 <= k <= n, with A344005(k) = A344005(n).

Crossrefs

Cf. also A344770, A345934.

Programs

  • PARI
    up_to = 65537;
    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; };
    A344005(n) = for(m=1, oo, if((m*(m+1))%n==0, return(m))); \\ From A344005
    v354990 = ordinal_transform(vector(up_to,n,A344005(n)));
    A354990(n) = v354990[n];

Formula

a(n) >= A354991(n).
Showing 1-3 of 3 results.