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: Jonathan Frech

Jonathan Frech's wiki page.

Jonathan Frech has authored 5 sequences.

A325902 Numbers whose neighbor's prime factors with multiplicity can be partitioned into two multisets of equal sum.

Original entry on oeis.org

11, 17, 21, 23, 27, 31, 50, 55, 56, 65, 71, 89, 129, 131, 144, 155, 169, 204, 209, 216, 229, 239, 241, 244, 251, 265, 287, 288, 300, 305, 337, 344, 351, 371, 373, 379, 407, 415, 493, 494, 517, 526, 545, 577, 645, 647, 664, 681, 685, 737, 749, 755, 769, 776, 780, 783, 815
Offset: 1

Author

Jonathan Frech, Sep 07 2019

Keywords

Comments

The neighbors of n are the two numbers n-1 and n+1.

Examples

			71 is in the sequence since 70 = 2*5*7 < 71 < 2*2*2*3*3 = 72 with 2 + 5 + 3 + 3 = 7 + 2 + 2 + 2.
		

Crossrefs

Cf. A063968.

Programs

  • Haskell
    import Data.List (subsequences, (\\))
    factors 1 = []
    factors n | p <- head $ filter ((== 0) . mod n) [2..]
              = p : factors (n `div` p)
    sumPartitionable ns | p <- \ms -> sum ms == sum (ns \\ ms)
                        = any p $ subsequences ns
    a325902 = filter (\n -> sumPartitionable $ factors (n-1) ++ factors (n+1)) [2..]
  • Mathematica
    ok[n_] := Block[{t, p, m, z}, {p, m} = Transpose@ Tally@ Sort[ Join@ Flatten[ ConstantArray @@@ FactorInteger[#] & /@ {n-1, n+1}]]; t = Total[p m]; If[ OddQ@ t, False, z = Quiet@ LinearProgramming[1 + 0 p, {p}, {{t/2, 0}}, Prepend[#, 0] & /@ Transpose@{m}, Integers]; ListQ@z && Total[z p]==t/2]]; Select[ Range[3, 815], ok] (* Giovanni Resta, Sep 10 2019 *)

A288040 Integers whose number of distinct decimal digits is prime.

Original entry on oeis.org

10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 100, 101
Offset: 1

Author

Jonathan Frech, Jun 04 2017

Keywords

Comments

Differs from A139819 (which contains, for example, 1234, a number with 4 distinct decimal digits). - R. J. Mathar, Jun 14 2017

Crossrefs

Union of A031955 and A031962 and ....

Programs

  • Mathematica
    Select[Range@ 101, PrimeQ@ Count[DigitCount[#], ?(# != 0 &)] &] (* _Michael De Vlieger, Jun 06 2017 *)
  • PARI
    isok(m) = isprime(#Set(digits(m))); \\ Michel Marcus, May 10 2020
  • Python
    from sympy import isprime
    print([n for n in range(1, 100) if isprime(len(set(str(n))))])
    

A286193 Decimal expansion of Sum_{n>=1} 1/(n^n+n).

Original entry on oeis.org

7, 0, 4, 1, 8, 8, 3, 4, 9, 9, 2, 3, 3, 1, 4, 7, 1, 8, 1, 7, 1, 2, 6, 2, 0, 0, 0, 4, 4, 2, 2, 1, 8, 5, 7, 8, 0, 3, 0, 4, 1, 5, 8, 5, 3, 7, 7, 2, 9, 0, 9, 4, 4, 5, 0, 7, 4, 2, 2, 2, 3, 4, 0, 3, 8, 6, 1, 3, 9, 0, 6, 9, 3, 8, 2, 4, 0, 7, 7, 6, 1, 5, 5, 9, 0, 4, 5, 6, 8, 5, 6, 2, 3, 5, 3, 0, 5, 6
Offset: 0

Author

Jonathan Frech, May 04 2017

Keywords

Examples

			0.70418834992331471817126200044221857803...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[N[Sum[1/(n^n+n),{n,1,Infinity}],20]][[1]]
  • PARI
    suminf(n=1, 1/(n^n+n)) \\ Michel Marcus, May 04 2017
  • Python
    from decimal import *;getcontext().prec=300;print(sum([Decimal(1)/Decimal(n**n+n)for n in range(1,200)]))
    

A285494 Numbers k such that digit sum of k = number of distinct prime factors of k.

Original entry on oeis.org

20, 30, 102, 120, 200, 300, 1002, 1200, 2000, 2001, 2002, 3000, 3010, 10001, 10002, 10011, 10030, 10120, 11001, 11020, 11110, 12000, 20000, 20001, 21010, 30000, 30030, 30100, 100001, 100030, 100101, 100130, 100210, 100300, 101001, 101101, 101200, 102102, 110001, 110200
Offset: 1

Author

Jonathan Frech, Apr 19 2017

Keywords

Programs

  • Mathematica
    Select[Range[2,10000],Total[IntegerDigits[#]]==Length[FactorInteger[#]]&] (* or *)
    nd = 10; s = 1; Sort@ Flatten@ Reap[ While[ Times @@ Prime[ Range@ s] < 10^nd, pa = IntegerPartitions[s, {nd}, Range[0, 9]]; Do[Sow@ Select[ FromDigits /@ Permutations[p], PrimeNu[#] == s &], {p, pa}]; s++]][[2, 1]] (* terms < 10^10, Giovanni Resta, Apr 21 2017 *)
  • PARI
    isok(n) = sumdigits(n) == omega(n); \\ Michel Marcus, Apr 20 2017

Extensions

More terms from Michel Marcus, Apr 20 2017

A278328 Numbers n such that abs(n - rev(n)) is a square, where rev(n) is the decimal reverse of n (A004086).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 21, 22, 23, 26, 32, 33, 34, 37, 40, 43, 44, 45, 48, 51, 54, 55, 56, 59, 62, 65, 66, 67, 73, 76, 77, 78, 84, 87, 88, 89, 90, 95, 98, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 202, 212, 222, 232, 242, 252, 262
Offset: 1

Author

Jonathan Frech, Nov 18 2016

Keywords

Comments

All palindromes are in this sequence, hence it is infinite.

Crossrefs

A002113 is a subsequence.

Programs

  • Maple
    a:= proc(n) option remember; local k; for k from 1+
          `if`(n=1, -1, a(n-1)) while not issqr(abs(k-(s->
           parse(cat(s[-i]$i=1..length(s))))(""||k))) do od: k
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 18 2016
  • Mathematica
    Select[Range@ 262, IntegerQ@ Sqrt@ Abs[# - FromDigits@ Reverse@ IntegerDigits@ #] &] (* Michael De Vlieger, Nov 18 2016 *)
  • PARI
    is(n) = issquare(abs(n - eval(concat(Vecrev(Str(n)))))) \\ Felix Fröhlich, Nov 18 2016
    
  • PARI
    is(n, {b=10}) = issquare(abs(n - subst(Polrev(digits(n, b),'x),'x,b))); \\ Gheorghe Coserea, Nov 27 2016
  • Python
    import math
    n = 0
    while True:
        if math.sqrt(abs(n-int(str(n)[::-1])))%1 == 0:
            print(n)
        n += 1 # Jonathan Frech, Nov 18 2016