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.

User: Amritpal Singh

Amritpal Singh's wiki page.

Amritpal Singh has authored 2 sequences.

A253388 Numbers n such that the number of divisors of n is the product of two distinct primes.

Original entry on oeis.org

12, 18, 20, 28, 32, 44, 45, 48, 50, 52, 63, 68, 75, 76, 80, 92, 98, 99, 112, 116, 117, 124, 144, 147, 148, 153, 162, 164, 171, 172, 175, 176, 188, 192, 207, 208, 212, 236, 242, 243, 244, 245, 261, 268, 272, 275, 279, 284, 292, 304, 316, 320, 324, 325, 332, 333
Offset: 1

Author

Amritpal Singh, Dec 31 2014

Keywords

Comments

n such that A000005(n) is in A006881.
n is either of the form p^k where p is prime and k+1 is in A006881 or p1^k1*p2^k2 where p1 and p2 are distinct primes and k1+1 and k2+1 are distinct primes. - Robert Israel, Dec 31 2014

Examples

			12 has 6 divisors, and 6 is the product of two distinct primes, 2 and 3.
		

Crossrefs

Cf. A000005, A006881. Contains A030515.

Programs

  • Maple
    filter:= proc(n) local F;
      F:= ifactors(numtheory:-tau(n))[2];
      nops(F)=2 and F[1,2]=1 and F[2,2]=1;
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Dec 31 2014
  • Mathematica
    a253388Q[x_] := Block[{d = FactorInteger[DivisorSigma[0, x]]},
    Length[d] == 2 && Max[Last@Transpose@d] == 1]; a253388[n_] := Select[Range@n, a253388Q]; a253388[333] (* Michael De Vlieger, Jan 02 2015 *)
    fQ[x_] := PrimeOmega@ x == 2 == PrimeNu@ x; Select[ Range@ 250, fQ[ DivisorSigma[0, #]] &] (* Robert G. Wilson v, Jan 13 2015 *)
  • PARI
    isok(n) = (nbd = numdiv(n)) && (omega(nbd) == 2) && (bigomega(nbd) == 2); \\ Michel Marcus, Feb 07 2015

A218034 Number of ways to seat 4 types of people in n labeled seats around a circle such that no two adjacent people are of the same type.

Original entry on oeis.org

1, 4, 12, 24, 84, 240, 732, 2184, 6564, 19680, 59052, 177144, 531444, 1594320, 4782972, 14348904, 43046724, 129140160, 387420492, 1162261464, 3486784404, 10460353200, 31381059612, 94143178824, 282429536484, 847288609440, 2541865828332, 7625597484984, 22876792454964
Offset: 0

Author

Amritpal Singh, Oct 19 2012

Keywords

Comments

Number of length-n words with 4 letters and no two adjacent identical letters (including, for n >= 2, the first and last letter). - Joerg Arndt, Oct 21 2012
a(n), for n > 1, apparently is the trace of the n-th power of the adjacency matrix of the complete 4-graph, a 4 X 4 matrix with diagonal elements all zeros and off-diagonal all ones (cf. A054878). - Tom Copeland, Nov 06 2012
The corrected formula by Geoffrey Critzer below (for a general k) is a special case of Theorem 2 in Burstein and Wilf (1997). See also Edlin and Zeilberger (2000), Corollary 5.5 in Taylor (2014), and Section 5 in Hadjicostas and Zhang (2018). - Petros Hadjicostas, Jul 09 2018

Crossrefs

Cf. A092297.

Programs

  • Mathematica
    nn=28; CoefficientList[Series[1+4x +12x^2/(1+x)^2/(1-4x/(1+x)),{x,0,nn}],x] (* Geoffrey Critzer, Apr 05 2014 *)
  • Maxima
    a[0]:1$ a[1]:4$ a[n]:=3^n + 3*(-1)^n$ makelist(a[n],n,0,40); /* Martin Ettl, Oct 21 2012 */
    
  • PARI
    a(n) = if( n<2, [1,4][n+1], 3^n + 3*(-1)^n ); /* Joerg Arndt, Oct 21 2012 */

Formula

a(0) = 1, a(1) = 4, a(n) = 3^n + 3*(-1)^n for n >= 2.
a(n) = 4 * A054878(n) for n >= 2. - Joerg Arndt, Oct 21 2012
G.f.: (1 + 2*x + x^2 - 12*x^3)/((1 + x)*(1 - 3*x)). - Colin Barker, Oct 22 2012
Generally for such words on k letters, g.f.: 1 + k*x + (k^2-k)*x^2/(1 + x)^2/(1 - k*x/(1 + x)). - Geoffrey Critzer, Apr 05 2014 [Corrected by Petros Hadjicostas, Jul 08 2018]
a(n+m) = a(n)*a(m)/4 + a(n+1)*a(m+1)/12. - Yuchun Ji, Sep 12 2017

Extensions

a(0) = 1 prepended and more terms added by Joerg Arndt, Oct 21 2012