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: Gregg Whisler

Gregg Whisler's wiki page.

Gregg Whisler has authored 7 sequences.

A216467 Smallest numbers in the coordinates of the isolated visible lattice points in the infinite square grid.

Original entry on oeis.org

21, 35, 39, 45, 51, 55, 57, 69, 75, 77, 85, 87, 91, 93, 95, 99, 105, 111, 115, 117, 119, 123, 133, 135, 141, 143, 145, 147, 153, 155, 159, 161, 165, 171, 175, 177, 183, 185, 187, 189, 195, 201, 203, 205, 207, 209, 213, 215, 217, 219, 221, 225, 231, 235, 237, 244, 245
Offset: 1

Author

Gregg Whisler, Sep 07 2012

Keywords

Comments

See A178793, A178794 for terminology.
It is not clear to me how many - if any! - of these terms are known to be correct. - N. J. A. Sloane, Oct 17 2012
From Charlie Neder, Jun 27 2018: (Start)
For row k to contain an isolated lattice point, k must contain a pair (m-1,m+1) of nontotatives, and both k-1 and k+1 must contain a triple of consecutive nontotatives. The CRT can then be used to "align" the groups into a box containing a lattice point. We consider the cases when k is odd and when k is even:
a) k is odd:
k cannot be a prime p or a power of a prime, because then the nontotatives to k are precisely the multiples of p, which contain no pairs since k is odd and therefore p > 2. As long as k is divisible by at least two odd primes, a pair can be found by the CRT.
k-1 and k+1 are even but cannot be powers of two, since then the nontotatives would be the even numbers, which contain no triples. As long as they each have at least one odd divisor, then all the odd nontotatives will be centers of triples.
b) k is even:
There are no other restrictions on k itself, since pairs are very easy to find for even k. (e.g. for any prime p not dividing k, (p-1,p+1) is a valid pair)
k-1 and k+1 are both odd and must be the products of at least three distinct primes, since a triple could not form otherwise. The CRT can be used to find triples as long as this is the case.
The first such even k is 664, with isolated point (189449,664) on it. (End)

Crossrefs

Programs

  • Mathematica
    Select[Range[300], If[OddQ[#], !PrimePowerQ[#] && !PrimePowerQ[# - 1] && !PrimePowerQ[# + 1], PrimeOmega[# - 1] > 2 && PrimeOmega[# + 1] > 2]&] (* Jean-François Alcover, Sep 02 2019, after Andrew Howroyd *)
  • PARI
    select(k->if(k%2, !isprimepower(k) && !isprimepower(k-1) && !isprimepower(k+1), omega(k-1)>2 && omega(k+1)>2), [1..300]) \\ Andrew Howroyd, Jun 27 2018

Extensions

Several missing terms added by Charlie Neder, Jun 27 2018
More terms from Jean-François Alcover, Sep 02 2019

A178793 These are the y coordinates of isolated visible lattice points in the plane.

Original entry on oeis.org

55, 175, 551, 575, 589, 609, 679, 741, 741, 791, 799, 805, 875, 945, 987, 987, 995, 1035, 1065, 1105, 1105, 1159, 1209, 1275, 1309, 1309, 1309, 1407, 1421, 1463, 1463, 1463, 1495, 1495, 1551, 1581, 1581, 1611, 1625, 1639, 1651, 1665, 1665, 1665, 1695
Offset: 1

Author

Gregg Whisler, Jun 15 2010

Keywords

Comments

From Gregg Whisler, Jun 21 2010: (Start)
a(n) is also A157428 + 1. [Charles R Greathouse IV points out that this is false, since (1308, 1274) is in (A157428, A157429) but not in (A178793, A178794). Oct 17 2012]
An isolated lattice point is surrounded (in a Moore neighborhood of r=1) in the Z^2 lattice of points by 8 points that are not visible from the origin. (End)

Crossrefs

Cf. A157428, A157429, A178794 (corresponding x coordinates), A216467.

Programs

  • Mathematica
    Table[Replace[Select[First/@Position[Partition[CoprimeQ[n,Range[n]],3,1],{False,True,False},{1}]+1, Outer[CoprimeQ, n+ {-1,1},#1+{-1,0,1}]=={{False,False,False},{False,False,False}}&],{{}-> Sequence[], list_:>Sequence@@ ({#1,n}&)/@list}],{n,2000}][[All, 2]] (* Eric Rowland *)

Extensions

More terms (until the corresponding first x coordinate (21) repeats) from Gregg Whisler, Jun 21 2010

A178794 These are the x coordinates of the isolated visible lattice points in the plane.

Original entry on oeis.org

21, 99, 115, 369, 495, 475, 195, 259, 265, 225, 375, 741, 741, 649, 323, 377, 399, 1001, 1001, 441, 987, 609, 755, 1001, 545, 645, 1035, 407, 1275, 153, 645, 1275, 51, 1221, 485, 35, 805, 715, 441, 595, 1015, 221, 1001, 1183, 371, 391, 575, 519, 645, 1065
Offset: 1

Author

Gregg Whisler, Jun 15 2010

Keywords

Comments

An isolated lattice point is surrounded (in a Moore neighborhood) by 8 points that are not visible from the origin. I have also submitted the corresponding sequence of denominators.
From Gregg Whisler, Jun 21 2010: (Start)
a(n) is also A157429 + 1.
These are also the x coordinates of the isolated visible lattice points in Z^2. (End)

Crossrefs

Cf. A178793 (corresponding y coordinates), A157428, A157429, A216467.

Programs

  • Mathematica
    Table[Replace[Select[First/@Position[Partition[CoprimeQ[n,Range[n]],3,1],{False,True,False},{1}]+1, Outer[CoprimeQ, n+ {-1,1},#1+{-1,0,1}]=={{False,False,False},{False,False,False}}&],{{}-> Sequence[], list_:>Sequence@@ ({#1,n}&)/@list}],{n,2000}][[All, 1]] (* Eric Rowland *)

Extensions

More terms (until the initial 21 repeats) from Gregg Whisler, Jun 21 2010

A140435 Number of new lattice points created at each step in an n X n grid that are not visible.

Original entry on oeis.org

0, 1, 1, 3, 1, 7, 1, 7, 5, 11, 1, 15, 1, 15, 13, 15, 1, 23, 1, 23, 17, 23, 1, 31, 9, 27, 17, 31, 1, 43, 1, 31, 25, 35, 21, 47, 1, 39, 29, 47, 1, 59, 1, 47, 41, 47, 1, 63, 13, 59, 37, 55, 1, 71, 29, 63, 41, 59, 1, 87, 1, 63, 53, 63, 33, 91, 1, 71, 49, 91, 1, 95, 1, 75, 69, 79, 33, 107, 1, 95, 53
Offset: 1

Author

Gregg Whisler, Jun 25 2008

Keywords

Crossrefs

Programs

  • Mathematica
    g[n_] := Table[ #^2 &[m], {m, 1, n + 1}] - FoldList[Plus, 1, 2 Array[EulerPhi, n, 2]] - Most[Flatten[ Append[{0}, Table[ #^2 &[m], {m, 1, n + 1}] - FoldList[Plus, 1, 2 Array[EulerPhi, n, 2]]]]]; g[80]

Formula

G.f.: -Sum_{k>=2} mu(k) * x^k * (1 + x^k) / (1 - x^k)^2. - Ilya Gutkovskiy, Sep 14 2021

Extensions

More terms from Robert G. Wilson v, Jan 17 2011

A140434 Number of new visible points created at each step in an n X n grid.

Original entry on oeis.org

1, 2, 4, 4, 8, 4, 12, 8, 12, 8, 20, 8, 24, 12, 16, 16, 32, 12, 36, 16, 24, 20, 44, 16, 40, 24, 36, 24, 56, 16, 60, 32, 40, 32, 48, 24, 72, 36, 48, 32, 80, 24, 84, 40, 48, 44, 92, 32, 84, 40, 64, 48, 104, 36, 80, 48, 72, 56, 116, 32, 120
Offset: 1

Author

Gregg Whisler, Jun 25 2008, Jun 28 2008

Keywords

Comments

Equals row sums of triangle A143467. - Gary W. Adamson, Aug 17 2008
Equals first differences of A018805: (1, 3, 7, 11, 19, 23, 35, ...). - Gary W. Adamson, Aug 17 2008
a(n) is the number of rationals p/q such that |p| + |q| = n. - Geoffrey Critzer, Oct 11 2011
a(n) is the number of nonempty lists of positive integers whose continuants are equal to n. For example, for n = 6 these continuants are [6], [5,1], [1,5], and [1,4,1]. - Jeffrey Shallit, May 18 2016
a(n) is the number of Christoffel words of length n, for n>=2. Here a binary word w is a Christoffel word if its first and last letters are different, say w = axb with a<>b, and x is a palindrome, and w is the concatenation of two palindromes. See the book of Reutenauer. - Jeffrey Shallit, Apr 04 2024

Examples

			G.f. = x + 2*x^2 + 4*x^3 + 4*x^4 + 8*x^5 + 4*x^6 + 12*x^7 + 8*x^8 + 12*x^9 + ...
		

References

  • C. Reutenauer, From Christoffel words to Markoff numbers, Oxford University Press, 2019.

Crossrefs

Cf. A018805, A100613, A140435. Equals twice A000010 (for n >= 2).

Programs

  • Haskell
    a140434 n = a140434_list !! (n-1)
    a140434_list = 1 : zipWith (-) (tail a018805_list) a018805_list
    -- Reinhard Zumkeller, May 04 2014
    
  • Mathematica
    f[n_] := FoldList[Plus, 1, 2 Array[EulerPhi, n, 2]] // Differences // Prepend[#, 1]&
    a[ n_] := If[ n < 3, Max[0, n], Sum[ MoebiusMu[d] (2 n/d - 1 - Mod[n/d, 2]), {d, Divisors@n}]]; (* Michael Somos, Jul 24 2015 *)
  • PARI
    {a(n) = if( n<3, max(0, n), sumdiv(n, d, moebius(d) * (2*n/d - 1 - (n/d)%2)))}; /* Michael Somos, Jul 24 2015 */
    
  • PARI
    my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, moebius(k)*x^k*(1+x^k)/(1-x^k)^2)) \\ Seiichi Manyama, May 24 2021
    
  • Python
    from sympy import totient
    def A140434(n): return totient(n)<<1 if n>1 else 1 # Chai Wah Wu, May 09 2025

Formula

a(n) = 2*phi(n), where phi is Euler's phi function, A000010, for n >= 2.
Sum_{k=1..n} a(k)*floor(n/k) = n^2. - Benoit Cloitre, Nov 09 2016
G.f.: Sum_{k>=1} mu(k) * x^k * (1 + x^k)/(1 - x^k)^2. - Seiichi Manyama, May 24 2021

Extensions

Mathematica simplified by Jean-François Alcover, Jun 06 2013

A133334 Signature sequence of e^(1/e) - the solution (the y value) to Steiner's problem: find the max value attained by y=x^(1/x).

Original entry on oeis.org

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

Author

Gregg Whisler, Oct 19 2007

Keywords

Crossrefs

Cf. A073229.

Programs

  • Mathematica
    Take[Transpose[ Sort[Flatten[Table[{i + j*(E^(1/E)), i}, {i, 17}, {j, 15}], 1], #1[[1]] < #2[[1]] &]][[2]], 91]

A133299 Fractal sequence of the Stolarsky array, A035506.

Original entry on oeis.org

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

Author

Gregg Whisler, Oct 17 2007

Keywords

Examples

			As a fractal sequence, if each first occurrence of each n is deleted, then the resulting sequence is the same as the original. For the fractal sequence of the Wythoff array, see A003603.
		

References

  • D. R. Morrison, A Stolarsky Array of Wythoff Pairs, A Collection of Manuscripts Related to the Fibonacci Sequence, edited by V. E. Hoggatt Jr., M. Bicknell-Johnson, published by The Fibonacci Association, (1980) pp. 134-136. - Casey Mongoven, Sep 10 2011

Crossrefs

Programs

  • Maple
    A035506 := proc(r,c) local tau,a,b,d,i ; tau := (1+sqrt(5))/2 ; a := floor( r*(1+tau)-tau/2) ; b := round(a*tau) ; if c = 1 then RETURN(a) ; else if c =2 then RETURN(b) ; else for i from 1 to c-2 do d := a+b ; a := b; b := d ; od: RETURN(d) ; fi ; fi ; end:
    A133299 := proc(n) local row,col ; for row from 1 do for col from 1 do stola := A035506(row,col) ; if stola = n then RETURN(row) ; elif stola > n then break ; fi ; od: od: end:
    seq(A133299(n),n=1..100) ; # R. J. Mathar, Nov 21 2007
  • Mathematica
    A035506[r_, c_] := Module[{tau = GoldenRatio, a, b, d, i}, a = Floor[r*(1 + tau) - tau/2]; b = Round[a*tau]; If[c == 1, Return[a], If[c == 2, Return[b], For[i = 1, i <= c - 2, i++, d = a + b; a = b; b = d]; Return[d]]]];
    a[n_] := Module[{row, col}, For[row = 1, True, row++, For[col = 1, True, col++, stola = A035506[row, col] ; If[stola == n, Return[row], If[stola > n, Break[]]]]]];
    Array[a, 100] (* Jean-François Alcover, Mar 22 2020, after R. J. Mathar *)

Formula

A035506(a(n),k)=n for some k>=1. - R. J. Mathar, Nov 21 2007
a(n) = 1+A098861(n). - Casey Mongoven, Sep 10 2011

Extensions

Better definition from R. J. Mathar, Oct 22 2007
More terms from R. J. Mathar, Nov 21 2007
Definition now conforms to others; comment replaced - Clark Kimberling, Oct 29 2009