login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A275256 Numbers with a minimum of 6 polygonal roots, excluding itself. 6
1225, 1540, 2926, 4005, 5985, 8856, 9045, 9801, 11781, 11935, 12376, 12496, 12720, 13041, 14400, 16401, 17200, 17226, 17290, 17865, 18096, 21528, 21736, 23001, 23751, 24220, 24976, 25425, 26796, 27000, 27405, 27951, 29241, 29316, 29601, 29646, 30976, 31465, 31536 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The i-th k-gonal number is equal to ((k-2)*i^2-(k-4)*i)/2. Sequence lists numbers n which are k-gonal numbers with k < n in at least 6 ways. - N. J. A. Sloane, Jul 25 2016

All polygonal roots (R) can be calculated for each number by checking if any numbers less than N give an integer result from (((K - 2) * (N * N) - (K - 4) * N) / 2), where K is increased until the numbers returned are larger than our N.

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..10000

EXAMPLE

For n = 5 we have a(5) = 5985. 5985 has 6 polygonal roots, since 5985 is the 45th octogonal number, the 35th dodecagonal number, the 18th 41-gonal number, the 9th 168-gonal number, the fifth 600-gonal number, and the third 1996-gonal number.

PROG

(C#)

List<BigInteger> CurrentBases = new List<BigInteger>();

List<BigInteger> CurrentNexts = new List<BigInteger>();

private int interesting2NumberPolygons;

public int Interesting2NumberPolygons

{

    get

    {

        return interesting2NumberPolygons;

    }

    set

    {

        interesting2NumberPolygons = value;

        OnPropertyChanged("Interesting2NumberPolygons");

    }

}

private BigInteger interesting2Number;

public BigInteger Interesting2Number

{

    get

    {

        return interesting2Number;

    }

    set

    {

        interesting2Number = value;

        OnPropertyChanged("Interesting2Number");

    }

}

private string fileLocation = "C:/NumberGen/";

public string FileLocation

{

    get

    {

        return fileLocation;

    }

    set

    {

        fileLocation = value;

        Properties.Settings.Default.LastLocation = value;

        Properties.Settings.Default.Save();

        OnPropertyChanged("FileLocation");

    }

}

private void FindAllIntegers()

    {

        Interesting2Number = 0;

        Interesting2NumberPolygons = 0;

        CurrentBases = new List<BigInteger>();

        CurrentNexts = new List<BigInteger>();

        BigInteger i = 0;

        int j = 0;

        while(true)

        {

            bool Finished = false;

            int k = 3;

            while (!Finished)

            {

                if (k >= CurrentBases.Count)

                {

                    CurrentBases.Add(1);

                    CurrentNexts.Add(1);

                }

                else

                {

                    if(CurrentNexts[k] < i)

                    {

                        CurrentBases[k]++;

                        CurrentNexts[k] = PolygonalNumber(CurrentBases[k], k);

                    }

                    if(CurrentBases[k] <= 3 && CurrentNexts[k] >= i)

                    {

                        Finished = true;

                    }

                    k++;

                }

            }

            if(CurrentNexts.FindAll(Nexts => Nexts == i).Count >= 6)

            {

                List<int> Results = Enumerable.Range(0, CurrentNexts.Count)

                                    .Where(ind => CurrentNexts[ind] == i)

                                    .ToList();

                string Row = "";

                Row += i + ", " + Results.Count;

                foreach(int Result in Results)

                {

                    Row += ", " + Result + ", " + CurrentBases[Result];

                }

                using (StreamWriter ResultsWriter = File.AppendText(@FileLocation + "Interesting2Numbers.dat"))

                {

                    ResultsWriter.WriteLine(Row);

                }

                if(Results.Count >= Interesting2NumberPolygons)

                {

                    Interesting2NumberPolygons = Results.Count;

                    Interesting2Number = i;

                }

            }

            if (i % 100 == 0)

            {

                Worker.ReportProgress(0, i);

                using (StreamWriter DropCatcher = File.CreateText(@FileLocation + "DropCatcher.dat"))

                {

                    DropCatcher.WriteLine(i);

                }

            }

            j++;

            i++;

        }

    }

    private BigInteger PolygonalNumber(BigInteger N, BigInteger Sides)

    {

        if (Sides < 3)

        {

            return BigInteger.Zero;

        }

        //TRI: (N^2+N)/2

        else if (Sides == 3)

        {

            return ((N * N + N) / 2);

        }

        //POLY: ((S-2)N^2-(S-4)N)/2

        else

        {

            return (((Sides - 2) * (N * N) - (Sides - 4) * N) / 2);

        }

    }

(Python)

A275256_list = []

for m in range(2, 10**5):

    n, c = 3, 0

    while (n*(n+1)) <= 2*m:

        if not 2*(n*(n-2) + m) % (n*(n - 1)):

            c += 1

            if c >= 6:

                break

        n += 1

    if c >= 6:

        A275256_list.append(m) # Chai Wah Wu, Jul 25 2016

CROSSREFS

Sequence in context: A184038 A025407 A025405 * A183665 A250848 A014795

Adjacent sequences:  A275253 A275254 A275255 * A275257 A275258 A275259

KEYWORD

nonn

AUTHOR

Matthew Parker, Jul 21 2016

EXTENSIONS

a(22)-a(39) from Chai Wah Wu, Jul 24 2016

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 25 03:50 EDT 2019. Contains 324338 sequences. (Running on oeis4.)