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: Andrew McFarland

Andrew McFarland's wiki page.

Andrew McFarland has authored 4 sequences.

A201187 Number of distinct planar nets of the Platonic solids (in the order tetrahedron, cube, octahedron, dodecahedron, icosahedron).

Original entry on oeis.org

2, 11, 11, 43380, 43380
Offset: 1

Author

Andrew McFarland, Nov 28 2011

Keywords

Comments

A Platonic solid and its dual have the same number of nets.

Examples

			a(1) = 2 since a tetrahedron has 2 distinct nets.
		

Crossrefs

Cf. A053016.

A179005 Indices of nonprime repunits: nonnegative numbers n such that 11...111 = (10^n - 1)/9 is composite.

Original entry on oeis.org

0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
Offset: 1

Author

Andrew McFarland, Jan 03 2011

Keywords

Comments

The complement of A004023 in the set of nonnegative integers.

Examples

			3 appears because the 3-digit repunit 111 is composite (37*3).
4 appears because the 4-digit repunit 1111 is composite (101*11).
		

Crossrefs

Complement of A004023. Cf. A002275, A004022, A031974, A259102.

Programs

  • PARI
    isok(n) = !isprime((10^n - 1)/9); \\ Michel Marcus, Sep 05 2013

A176127 The number of permutations of {1,2,...,n,1,2,...,n} with the property that there are k numbers between the two k's in the set for k=1,...,n.

Original entry on oeis.org

0, 0, 2, 2, 0, 0, 52, 300, 0, 0, 35584, 216288, 0, 0, 79619280, 653443600, 0, 0, 513629782560, 5272675722400, 0, 0, 7598911885030976, 93690316113031872, 0, 0, 223367222197529806464, 3214766521218764786304, 0, 0
Offset: 1

Author

Andrew McFarland, Apr 09 2010

Keywords

Examples

			a(1)=0; a(2)=0; a(3)=a(4)=2 since {{2,3,1,2,1,3},{3,1,2,1,3,2}} and {{4,1,3,1,2,4,3,2},{2,3,4,2,1,3,1,4}} are the only ways to permute {1,2,3,1,2,3} and {1,2,3,4,1,2,3,4}, respectively, such that there is one number between the 1's, two numbers between the 2's,..., n numbers between the n's.
		

References

Crossrefs

Programs

  • Sage
    a=lambda n:sum(1 for i in DLXCPP([(i-1,j+n,i+j+n+1)for i in[1..n]for j in[0..n+n-i-2]]+[(i,)for i in[n..n+n-1]]))if n%4 in[0,3] else 0
    # Tomas Boothby, Jun 14 2013

Formula

a(n) = 2 * A014552(n).

Extensions

Edited and more terms added from A014552 by Max Alekseyev, May 31 2011, May 19 2015
Corrected and extended using results from the Assarpour et al. (2015) paper by N. J. A. Sloane, Feb 22 2016 at the suggestion of William Rex Marshall.

A140106 Number of noncongruent diagonals in a regular n-gon.

Original entry on oeis.org

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

Author

Andrew McFarland, Jun 03 2008

Keywords

Comments

Number of double-stars (diameter 3 trees) with n nodes. For n >= 3, number of partitions of n-2 into two parts. - Washington Bomfim, Feb 12 2011
Number of roots of the n-th Bernoulli polynomial in the left half-plane. - Michel Lagneau, Nov 08 2012
From Gus Wiseman, Oct 17 2020: (Start)
Also the number of 3-part non-strict integer partitions of n - 1. The Heinz numbers of these partitions are given by A285508. The version for partitions of any length is A047967, with Heinz numbers A013929. The a(4) = 1 through a(15) = 6 partitions are (A = 10, B = 11, C = 12):
111 211 221 222 322 332 333 433 443 444 544 554
311 411 331 422 441 442 533 552 553 644
511 611 522 622 551 633 661 662
711 811 722 822 733 833
911 A11 922 A22
B11 C11
(End)

Examples

			The square (n=4) has two congruent diagonals; so a(4)=1. The regular pentagon also has congruent diagonals; so a(5)=1. Among all the diagonals in a regular hexagon, there are two noncongruent ones; hence a(6)=2, etc.
		

Crossrefs

A001399(n-3) = A069905(n) = A211540(n+2) counts 3-part partitions.
Essentially the same as A004526.

Programs

  • Magma
    A140106:= func< n | n eq 1 select 0 else Floor((n-2)/2) >;
    [A140106(n): n in [1..80]]; // G. C. Greubel, Feb 10 2023
    
  • Maple
    with(numtheory): for n from 1 to 80 do:it:=0:
    y:=[fsolve(bernoulli(n,x) , x, complex)] : for m from 1 to nops(y) do : if Re(y[m])<0 then it:=it+1:else fi:od: printf(`%d, `,it):od:
  • Mathematica
    a[1]=0; a[n_?OddQ] := (n-3)/2; a[n_] := n/2-1; Array[a, 100] (* Jean-François Alcover, Nov 17 2015 *)
  • PARI
    a(n)=if(n>1,n\2-1,0) \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    def A140106(n): return n-2>>1 if n>1 else 0 # Chai Wah Wu, Sep 18 2023
  • SageMath
    def A140106(n): return 0 if (n==1) else (n-2)//2
    [A140106(n) for n in range(1,81)] # G. C. Greubel, Feb 10 2023
    

Formula

a(n) = floor((n-2)/2), for n > 1, otherwise 0. - Washington Bomfim, Feb 12 2011
G.f.: x^4/(1-x-x^2+x^3). - Colin Barker, Jan 31 2012
a(n) = floor(A129194(n-1)/A022998(n)), for n > 1. - Paul Curtz, Jul 23 2017
a(n) = A001399(n-3) - A001399(n-6). Compare to A007997(n) = A001399(n-3) + A001399(n-6). - Gus Wiseman, Oct 17 2020

Extensions

More terms from Joseph Myers, Sep 05 2009