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

A295785 a(n) = A179926(A025487(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 18, 1, 8, 5, 106, 1, 17, 6, 572, 1, 38, 2202, 7, 5712, 52, 2918, 1, 78, 41495, 8, 998928, 160, 14376, 1, 164, 742773, 9, 161737320, 469, 392628, 69162, 1, 2719708, 332, 4281895264, 824, 12825336, 10, 24698696592, 1337, 56372096, 327128, 1, 168712111, 680, 5859364320
Offset: 1

Views

Author

David A. Corneth, Dec 25 2017

Keywords

Comments

Terms in A179926 are only determined by their prime signature. A025487 gives the least positive integer having its prime signature. Combining these sequences removes a lot of duplicates making it somewhat easier to show terms.
a(54) = A003043(5) = 5859364320. - Andrew Howroyd, Oct 26 2019

Crossrefs

Extensions

Terms a(43) and beyond from Andrew Howroyd, Oct 26 2019

A003043 Number of Hamiltonian paths (or Gray codes) on n-cube with a marked starting node.

Original entry on oeis.org

1, 2, 18, 5712, 5859364320
Offset: 1

Views

Author

Keywords

Comments

More precisely, this is the number of ways of making a list of the 2^n nodes of the n-cube, with a distinguished starting position and a direction, such that each node is adjacent to the previous one. The final node may or may not be adjacent to the first. Finally, divide by 2^n since the starting node really doesn't matter.
Also, the number of strings s of length 2^n - 1 over the alphabet {1,2,...,n} with the property that every contiguous subblock has some letter that appears an odd number of times.

References

  • M. Gardner, Mathematical Games, Sci. Amer. Vol. 228 (No. 4, Apr. 1973), p. 111.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Formula

a(n) = A091299(n)/2^n.

Extensions

a(5) (from A091299) from Max Alekseyev, Jul 09 2006
Alternative description added by Jeffrey Shallit, Feb 02 2013

A173675 Let d_1, d_2, d_3, ..., d_tau(n) be the divisors of n; a(n) = number of permutations p of d_1, d_2, d_3, ..., d_tau(n) such that p_(i+1)/p_i is a prime or 1/prime for i = 1,2,...,tau(n)-1 and p_1 <= p_tau(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 8, 1, 4, 4, 1, 1, 8, 1, 8, 4, 4, 1, 14, 1, 4, 1, 8, 1, 72, 1, 1, 4, 4, 4, 20, 1, 4, 4, 14, 1, 72, 1, 8, 8, 4, 1, 22, 1, 8, 4, 8, 1, 14, 4, 14, 4, 4, 1, 584, 1, 4, 8, 1, 4, 72, 1, 8, 4, 72, 1, 62, 1, 4, 8, 8, 4, 72, 1, 22, 1, 4
Offset: 1

Views

Author

N. J. A. Sloane, Nov 24 2010

Keywords

Comments

Variant of A179926 in which the permutation of the divisors may start with any divisor but the first term may not be larger than the last term.
From Andrew Howroyd, Oct 26 2019: (Start)
Equivalently, the number of undirected Hamiltonian paths in a graph with vertices corresponding to the divisors of n and edges connecting divisors that differ by a prime.
a(n) depends only on the prime signature of n. See A295786. (End)

Examples

			a(1) = 1: [1].
a(2) = 1: [1,2].
a(6) = 4: [1,2,6,3], [1,3,6,2], [2,1,3,6], [3,1,2,6].
a(12) = 8: [1,2,4,12,6,3], [1,3,6,2,4,12], [1,3,6,12,4,2], [2,1,3,6,12,4], [3,1,2,4,12,6], [3,1,2,6,12,4], [4,2,1,3,6,12], [6,3,1,2,4,12].
		

Crossrefs

See A295557 for another version.

Programs

  • Maple
    with(numtheory):
    q:= (i, j)-> is(i/j, integer) and isprime(i/j):
    b:= proc(s, l) option remember; `if`(s={}, 1, add(
         `if`(q(l, j) or q(j, l), b(s minus{j}, j), 0), j=s))
        end:
    a:= proc(n) option remember; ((s-> add(b(s minus {j}, j),
           j=s))(divisors(n)))/`if`(n>1, 2, 1)
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 26 2017
  • Mathematica
    b[s_, l_] := b[s, l] = If[s == {}, 1, Sum[If[PrimeQ[l/j] || PrimeQ[j/l], b[s ~Complement~ {j}, j], 0], {j, s}]];
    a[n_] := a[n] = Function[s, Sum[b[s ~Complement~ {j}, j], {j, s}]][ Divisors[n]] / If[n > 1, 2, 1];
    Array[a, 100] (* Jean-François Alcover, Nov 28 2017, after Alois P. Heinz *)

Formula

From Andrew Howroyd, Oct 26 2019: (Start)
a(p^e) = 1 for prime p.
a(A002110(n)) = A284673(n).
a(n) = A295786(A101296(n)). (End)

Extensions

Alois P. Heinz corrected and clarified the definition and provided more terms. - Nov 07 2014

A180253 Call two divisors of n adjacent if the larger is a prime times the smaller. a(n) is the sum of elements of all pairs of adjacent divisors of n.

Original entry on oeis.org

0, 3, 4, 9, 6, 24, 8, 21, 16, 36, 12, 64, 14, 48, 48, 45, 18, 87, 20, 96, 64, 72, 24, 144, 36, 84, 52, 128, 30, 216, 32, 93, 96, 108, 96, 229, 38, 120, 112, 216, 42, 288, 44, 192, 174, 144, 48, 304, 64, 201, 144, 224, 54, 276, 144, 288, 160, 180, 60, 552, 62, 192, 232, 189
Offset: 1

Views

Author

Vladimir Shevelev, Aug 20 2010

Keywords

Comments

The pairs of adjacent divisors of n are counted in A062799(n).
For each divisor d of n we can check in how many pairs it occurs. For each prime divisor p of n, see the exponent of p in the factorization of d. If it's positive (p|d) then it occurs once more. If d*p doesn't divide n, add one to the frequency as well. - David A. Corneth, Dec 17 2018

Examples

			a(4) = (1 + 2) + (2 + 4) = 9.
a(120) = a(3*5*2^3) = 4*6*(3*8 + 4*4 + 4*2 + 3) = 1224.
		

Crossrefs

Programs

  • Mathematica
    divisorSumPrime[n_] := DivisorSum[n, 1+1/# &, PrimeQ[#] &]; a[n_] := DivisorSum[n, #*divisorSumPrime[#]& ]; Array[a, 70] (* Amiram Eldar, Dec 17 2018 *)
  • PARI
    a(n) = sumdiv(n, d, d*sumdiv(d, p, isprime(p)*(1+1/p))); \\ Michel Marcus, Dec 17 2018
    
  • PARI
    a(n) = my(f = factor(n), res = 0); fordiv(n, d, for(i = 1, #f~, v = valuation(d, f[i, 1]); res+=(d * ((v > 0) + (v < f[i, 2]))))); res \\ David A. Corneth, Dec 17 2018

Formula

a(n) = Sum_{d|n} d*Sum_{p|d} (1 + 1/p) where p is restricted to primes.
a(n) = Sum_{d|n} A069359(d) + Sum_{d|n} d*A001221(d).
a(n) = A323599(n) + A329354(n) = A323599(n) + A328260(n) + A329375(n). - Antti Karttunen, Nov 15 2019
a(p^k) = (p^k - 1)*(p + 1)/(p - 1).
a(p_1*p_2*...*p_m) = m*(p_1 + 1)*(p_2 + 1)*...*(p_m + 1).
a(p*q^k) = (p + 1)*(2*q^k + 3*q^(k - 1) + 3*q^(k - 2) + ... + 3*q + 2).
a(p*q*r^k) = (p + 1)*(q + 1)*(3*r^k + 4*r^(k - 1) + 4*r^(k - 2) + ... + 4*r + 3) and similar for a larger number of distinct prime factors of n.

Extensions

Definition rephrased, entries checked, one example added. - R. J. Mathar, Oct 25 2010

A180026 a(n) is the number of arrangements of all divisors of n of the form d_1=n, d_2, d_3, ..., d_tau(n) such that every ratio d_(i+1)/d_i and d_tau(n)/d_1 is prime or 1/prime.

Original entry on oeis.org

0, 1, 1, 0, 1, 2, 1, 0, 0, 2, 1, 2, 1, 2, 2, 0, 1, 2, 1, 2, 2, 2, 1, 2, 0, 2, 0, 2, 1, 12, 1, 0, 2, 2, 2, 0, 1, 2, 2, 2, 1, 12, 1, 2, 2, 2, 1, 2, 0, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 44, 1, 2, 2, 0, 2, 12, 1, 2, 2, 12, 1, 4, 1, 2, 2, 2, 2, 12, 1, 2, 0, 2, 1, 44, 2, 2, 2, 2, 1, 44, 2, 2, 2, 2, 2, 2, 1, 2, 2, 0, 1, 12, 1, 2, 12, 2, 1, 4, 1, 12, 2, 2, 1, 12, 2, 2, 2, 2, 2, 164, 0, 2, 2, 2, 0, 44, 1, 0
Offset: 1

Views

Author

Vladimir Shevelev, Aug 07 2010

Keywords

Comments

a(n) depends on exponents of prime power factorization of n only; moreover, it is invariant with respect to permutations of them. An equivalent multiset formulation of the problem: for a given finite multiset A, we should, beginning with A, to get all submultisets of A, if, by every step, we remove or join 1 element and such that, joining to the last submultiset one element, we again obtain A. How many ways to do this?
Via Seqfan Discussion List (Aug 07 2010), Alois P. Heinz proved that every subsequence of the form a(p), a(p*q), a(p*q*r), ..., where p, q, r, ... are distinct primes, coincides with A003042. - Vladimir Shevelev, Nov 07 2014

Examples

			If n=p*q, then we have exactly two required chains: p*q, p, 1, q and p*q, q, 1, p. Thus a(6)=a(10)=a(14)=...=2.
		

Crossrefs

Formula

a(p)=1, and, for k>=2, a(p^k)=0; a(p*q)=a(p^2*q)=a(p^3*q)=2; a(p^2*q^2)=0; a(p*q*r)=12, etc. (here p,q,r are distinct primes).

Extensions

Corrected and extended by Alois P. Heinz from a(48) via Seqfan Discussion List (Aug 07 2010)

A295557 Let d_1, d_2, d_3, ..., d_tau(n) be the divisors of n; a(n) = number of permutations p of d_1, d_2, d_3, ..., d_tau(n) such that p_(i+1)/p_i is a prime or 1/prime for i = 1,2,...,tau(n)-1.

Original entry on oeis.org

1, 2, 2, 2, 2, 8, 2, 2, 2, 8, 2, 16, 2, 8, 8, 2, 2, 16, 2, 16, 8, 8, 2, 28, 2, 8, 2, 16, 2, 144, 2, 2, 8, 8, 8, 40, 2, 8, 8, 28, 2, 144, 2, 16, 16, 8, 2, 44, 2, 16, 8, 16, 2, 28, 8, 28, 8, 8, 2, 1168, 2, 8, 16, 2, 8, 144, 2, 16, 8, 144, 2, 124, 2, 8, 16, 16, 8, 144
Offset: 1

Views

Author

Keywords

Crossrefs

See A173675 and A179926 for other versions.

Programs

  • Maple
    with(numtheory):
    q:= (i, j)-> is(i/j, integer) and isprime(i/j):
    b:= proc(s, l) option remember; `if`(s={}, 1, add(
         `if`(q(l, j) or q(j, l), b(s minus{j}, j), 0), j=s))
        end:
    a:= n-> ((s-> add(b(s minus {j}, j), j=s))(divisors(n))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 26 2017
  • Mathematica
    q[i_, j_] :=  PrimeQ[i/j];
    b[s_, l_] := b[s, l] = If[s == {}, 1, Sum[If[q[l, j] || q[j, l], b[s  ~Complement~ {j}, j], 0], {j, s}]];
    a[n_] := Function[s, Sum[b[s ~Complement~ {j}, j], {j, s}]][Divisors[n]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jun 12 2018, after Alois P. Heinz *)
Showing 1-6 of 6 results.