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: Adam Atkinson

Adam Atkinson's wiki page.

Adam Atkinson has authored 2 sequences.

A343839 Semi-one numbers: Positive integers k such that exactly half of the integers 1..k have a 1 in their decimal expansion.

Original entry on oeis.org

2, 16, 24, 160, 270, 272, 1456, 3398, 3418, 3420, 3422, 13120, 44686, 118096, 674934, 1062880
Offset: 1

Author

Adam Atkinson, May 01 2021

Keywords

Comments

There are only these 16 semi-one numbers. That there can only be finitely many is fairly easy to show: consider how many 100-billion-digit numbers have no 1s in them. Eventually the proportion of 1-less numbers drops below 50% and stays there. 5217031 numbers up to 9999999 have a 1 in them so proportion of 1-ful numbers can't drop below 50% for numbers with more digits. Hence the search program can stop at 10 million.

Examples

			16 is semi-1 because 1,10,11,12,13,14,15,16 have a 1 in them, there are 8 such numbers, and 8 is half of 16. 2 is semi-1 because 1 has a 1 in it and 2 does not.
		

Crossrefs

Programs

  • Mathematica
    s = {}; c = 0; Do[If[DigitCount[n, 10, 1] > 0, c++]; If[n == 2*c, AppendTo[s, n]], {n, 1, 1062880}]; s (* Amiram Eldar, May 01 2021 *)
    With[{nn=11*10^5},Select[Partition[Riffle[Range[nn],Accumulate[Table[If[DigitCount[n,10,1]>0,1,0],{n,nn}]]],2],#[[1]]==2#[[2]]&]][[;;,1]] (* Harvey P. Dale, Jun 23 2023 *)
  • PARI
    lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, #va, va[n] = va[n-1] + (#select(x->(x==1), digits(n)) > 0);); for (n=1, nn, if (va[n] == n/2 , print1(n, ", ")););} \\ Michel Marcus, May 02 2021
  • Perl
    for (1..10000000) {
            if (/1/) {
                    $s++;
                    }
            if ($_==2*$s) {
                    print $_."\n";
                    }
            }
    

A053020 Numbers which, when expressed as a sum of distinct primes with maximum product, use a non-maximal number of primes.

Original entry on oeis.org

319, 372, 492, 703, 865, 954, 1584, 1842, 2112, 2118, 2418, 2569, 2575, 2899, 2905, 3078, 3432, 3438, 4212, 4218, 4423, 4429, 5341, 5815, 5821, 6066, 6072, 6323, 6329, 6592, 7132, 7967, 7973, 8254, 8260, 8266, 9502, 9508, 9514, 9839, 9845, 10176, 10182, 11225, 11231
Offset: 1

Author

Adam Atkinson, Feb 23 2000

Keywords

Examples

			10 is not in the sequence because 5+3+2 has maximum product AND uses the maximum number of primes (3). (10 = 7+3 is worse in both senses). 319 is the first number for which there's a difference.
		

References

  • R. K. Guy, Unsolved Problems Number Theory, 2nd edition, Springer, 1994, F19.

Programs

  • Perl
    # See Atkinson link

Extensions

More terms from Adam Atkinson, Aug 23 2020